Skip to content

GitHub actions

GitHub actions #11

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Lukas Prediger <lumip@lumip.de>
# SPDX-License-Identifier: GPL-3.0-or-later
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
style_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Check style
run: dotnet format --verify-no-changes
- name: Install reuse linter
run: sudo apt-get install -y reuse
- name: Check reuse compliance
run: reuse lint
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Test and generate coverage report
run: |
dotnet test CompactCryptoGroupAlgebra.Tests/ --collect:"XPlat Code Coverage" --settings CompactCryptoGroupAlgebra.Tests/coverlet.runsettings
dotnet test CompactCryptoGroupAlgebra.LibCrypto.Tests/ --collect:"XPlat Code Coverage" --settings CompactCryptoGroupAlgebra.LibCrypto.Tests/coverlet.runsettings
- name: Copy coveralls report
run: |
mkdir ./CoverageResults
cp -v ./CompactCryptoGroupAlgebra.Tests/TestResults/*/coverage.info ./CoverageResults/base_coverage.info
cp -v ./CompactCryptoGroupAlgebra.LibCrypto.Tests/TestResults/*/coverage.info ./CoverageResults/libcrypto_coverage.info
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files:
./CoverageResults/base_coverage.info
./CoverageResults/libcrypto_coverage.info
format: lcov