-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (44 loc) · 1.75 KB
/
mutalk-workflow.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
name: MutalkCI
# This reusable workflow defines a mutation testing CI to run on a ginven project
# Specify the mode (full or diff) to run mutations
on:
workflow_call:
inputs:
mode:
description: 'modes: full (run on all project), diff (run on the last commit diff)'
default: 'full'
type: string
jobs:
mutation_testing:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hpi-swa/setup-smalltalkCI@v1
id: smalltalkci
with:
smalltalk-image: Pharo64-stable
- run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }}
shell: bash
timeout-minutes: 15
- run: ${{env.SMALLTALK_CI_VM}} ${{env.SMALLTALK_CI_IMAGE}} metacello install "github://pharo-contributions/mutalk/src" BaselineOfMuTalk
shell: bash
- name: full mutation testing
if: inputs.mode == 'full'
run: ${{env.SMALLTALK_CI_VM}} ${{env.SMALLTALK_CI_IMAGE}} mutalk --project=${{github.event.repository.name}}
- name: diff mutation testing
if: inputs.mode == 'diff'
run: ${{env.SMALLTALK_CI_VM}} ${{env.SMALLTALK_CI_IMAGE}} mutalk --project=${{github.event.repository.name}} --diff
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: mut_report
filePath: "${{env.SMALLTALK_CI_BUILD_BASE}}/__mutalk_summary.md"
- run: cp ${{env.SMALLTALK_CI_BUILD_BASE}}/__mutalk_summary.md $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v4
with:
name: mutation-testing-output
path: ${{env.SMALLTALK_CI_BUILD_BASE}}/__mutalk_export.json