-
-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (63 loc) · 2.28 KB
/
mutation-test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Mutation Test
on:
pull_request:
branches: [ "main" ]
paths: [ ".github/workflows/mutation-test.yml", ".config/*.json" ]
workflow_dispatch:
schedule:
- cron: "0 3 * * 0"
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛡️ Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
aka.ms:443
api.nuget.org:443
auth.docker.io:443
dashboard.stryker-mutator.io:443
dotnetcli.azureedge.net:443
github.com:443
production.cloudflare.docker.com:443
registry-1.docker.io:443
- name: 🛒 Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: 🧰 Setup .NET
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
with:
dotnet-version: |
6.x
8.x
global-json-file: global.json
- name: 🗃️ Setup NuGet cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: 🧬 Stryker
run: |
dotnet tool restore
dotnet stryker -f .config/stryker-config.json -O StrykerOutput --dashboard-api-key ${{ secrets.STRYKER_DASHBOARD_API_KEY }} -v main
- name: 📤 Upload Mutation Report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: mutation-report
path: StrykerOutput/reports
- name: 📓 Mutation Test Summary
run: cat StrykerOutput/reports/mutation-report.md >> $GITHUB_STEP_SUMMARY