Repository navigation
68 lines (61 loc) · 2.39 KB
/
Copy pathMutation.yml
File metadata and controls
68 lines (61 loc) · 2.39 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Mutation Testing
permissions:
contents: read
# Mutation runs rebuild + rerun the suite per mutant, so they are slow. Gate them behind
# manual dispatch and a weekly schedule rather than every PR.
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * 1" # Mondays 03:00 UTC
jobs:
stryker:
name: Stryker mutation testing
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
# RustPlusApi.csproj (core) is intentionally omitted: Stryker 4.x cannot mutate it
# because protobuf-net.BuildTools generates the RustPlusContracts types at compile
# time and Stryker's rollback compiler cannot resolve them. The core mappers/client
# are covered by exact-assertion unit tests instead. See docs/development/testing.md.
include:
- source: RustPlusApi.Fcm.csproj
testdir: tests/RustPlusApi.Fcm.UnitTests
- source: RustPlusApi.Fcm.Registration.csproj
testdir: tests/RustPlusApi.Fcm.Registration.UnitTests
- source: RustPlusApi.Camera.csproj
testdir: tests/RustPlusApi.Camera.UnitTests
- source: RustPlusApi.Extensions.DependencyInjection.csproj
testdir: tests/RustPlusApi.Extensions.DependencyInjection.UnitTests
- source: RustPlusApi.Fcm.Extensions.DependencyInjection.csproj
testdir: tests/RustPlusApi.Fcm.Extensions.DependencyInjection.UnitTests
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x
- name: Restore tools
run: dotnet tool restore
- name: Stryker (${{ matrix.source }}) with dashboard
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
working-directory: ${{ matrix.testdir }}
run: >
dotnet stryker
--config-file stryker-config.json
--project ${{ matrix.source }}
--version ${{ github.ref_name }}
--reporter cleartext
--reporter html
--reporter dashboard
- name: Upload mutation report
if: always()
uses: actions/upload-artifact@v7
with:
name: stryker-report-${{ matrix.source }}
path: ${{ matrix.testdir }}/StrykerOutput/**/reports/mutation-report.html
if-no-files-found: ignore