Generate Mutation Test Errors #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Mutation Test Errors | |
on: | |
schedule: | |
- cron: "0 13 1,15 * *" # Bi-weekly – 1PM UTC (9AM EST) on the 1st and 15th of every month | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: 🐿 Setup Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "^1.20" | |
- name: Display go version | |
run: go version | |
- name: Run mutation test | |
continue-on-error: true | |
run: make test-mutation $MODULES | |
env: | |
MODULES: tokenfactory,twap | |
- name: Execute mutation test format script | |
id: mutest-formatted | |
run: | | |
grep -Ev "PASS|SKIP" mutation_test_result.txt > mutation_test_result_temp.txt && mv mutation_test_result_temp.txt 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: Get today's date | |
id: date | |
run: | | |
echo "name=today::$(date "+%Y/%m/%d")" >> $GITHUB_STATE | |
- name: Read mutation_test_txt file | |
id: result | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: go_mutation_test_result.txt | |
- name: Create an mutation test output issue | |
uses: dacbd/create-issue-action@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: Mutation test ${{ steps.date.outputs.today }} | |
body: ${{ steps.result.outputs.content }} |