Skip to content

Commit 9a6dbe8

Browse files
committed
#19 Add Quick start instruction to ReadMe
1 parent 88e2747 commit 9a6dbe8

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,61 @@
88
[![Test without params](https://github.com/kurnakovv/stryker-net-action/actions/workflows/without-params-test.yml/badge.svg)](https://github.com/kurnakovv/stryker-net-action/actions/workflows/without-params-test.yml)
99

1010
</div>
11+
12+
This is a GitHub action that runs the [Stryker.NET](https://stryker-mutator.io/docs/stryker-net/introduction/) tool
13+
14+
# 🚀 Quick start
15+
16+
Install dotnet-stryker (not required) | [how?](https://stryker-mutator.io/docs/stryker-net/getting-started/#install-in-project)
17+
18+
Add config file via terminal
19+
```
20+
dotnet stryker init --config-file ".config/stryker-config.json"
21+
```
22+
23+
Open `.config/stryker-config.json` file and set minimum parameters
24+
```json
25+
{
26+
"stryker-config": {
27+
"reporters": [
28+
"html",
29+
"dashboard",
30+
"progress",
31+
],
32+
"project-info": {
33+
"name": "github.com/OWNER/YOUR_REPOSITORY_NAME"
34+
}
35+
}
36+
}
37+
```
38+
39+
Where `OWNER` is your GitHub name (e.g. `kurnakovv`), and `YOUR_REPOSITORY_NAME` your repository name (e.g. `stryker-net-action`)
40+
41+
Add `.github/workflows/stryker-net.yml` action
42+
```yml
43+
name: Stryker.NET mutation testing
44+
45+
on: [push, pull_request]
46+
47+
jobs:
48+
stryker_net:
49+
runs-on: ubuntu-latest
50+
# permissions.pull-request:write is required to send a report message to a pull request (when send-report-message: "true")
51+
permissions:
52+
pull-requests: write
53+
name: Stryker.NET GitHub action
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Setup .NET
59+
uses: actions/setup-dotnet@v4
60+
with:
61+
dotnet-version: 9.0.x
62+
63+
- name: Stryker.NET
64+
uses: ./
65+
with:
66+
config-path: ".config/stryker-config.json"
67+
dashboard-api-key: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
68+
```

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Stryker.NET GitHub action"
22
author: "kurnakovv"
3-
description: "Stryker .NET (Stryker Mutator) GitHub action"
3+
description: "Stryker .NET (Stryker Mutator) GitHub action 👽"
44
branding:
55
icon: "bar-chart-2"
66
color: "orange"

0 commit comments

Comments
 (0)