-
Notifications
You must be signed in to change notification settings - Fork 48
48 lines (40 loc) · 1.48 KB
/
mutest.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
name: Generate Mutation Test Errors
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Go 🧰
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Run mutation tests 🧪
continue-on-error: true
run: make test-mutation $MODULES
env:
MODULES: profiles,subspaces,relationships,posts,reports,reactions
- name: Format output 🔍
id: mutest-formatted
run: |
cat mutation_test_result.txt | grep -Ev "PASS" | grep -Ev "SKIP" | tee mutation_test_result.txt
- name: Generate code blocks 🧑💻
id: gen-code-blocks
run: |
cat mutation_test_result.txt | sed "s# @@# @@\n\`\`\`go\n#g " | sed "s#FAIL#\`\`\`\nFAIL\n\n\n#g " > go_mutation_test_result.txt
- name: Read output file 👀
id: result
uses: juliangruber/read-file-action@v1
with:
path: go_mutation_test_result.txt
- name: Create issue 🚩
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Mutation test ${{ steps.vars.outputs.tag }}
body: ${{ steps.result.outputs.content }}