-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.77 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# 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