Stryker evaluator action for Tryber projects
This action evaluate Tryber projects with Stryker library.
-
pr_author_username
Required
Pull Request author username.
-
result
Stryker unit tests JSON results in base64 format.
- name: Fetch Stryker evaluator
uses: actions/checkout@v2
with:
repository: betrybe/stryker-evaluator-action
ref: v3.1
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/stryker-evaluator
- name: Run Stryker evaluation
id: evaluator
uses: ./.github/actions/stryker-evaluator
with:
pr_author_username: ${{ github.event.inputs.pr_author_username }}
- name: Run Stryker evaluation
id: stryker_evaluator
uses: ./.github/actions/stryker-evaluator
with:
pr_author_username: ${{ github.event.inputs.pr_author_username }}
- name: Next step
uses: another-github-action
with:
param: ${{ steps.stryker_evaluator.outputs.result }}
The description of the requirement into .trybe/requirements.json
must be {FILE_NAME} mutation test
where FILE_NAME
is the real filename without the extensions.
Example: for the
fetchItem.test.js
validation the requirement description must befetchItem mutation test
.
The example fetchItem.test.js
file's code:
describe('Test #1' () => {
it('unit test1', () => {});
it('unit test2', () => {});
it('unit test3', () => {});
});
describe('Test #2' () => {
...
});
describe('Test #3' () => {
...
});
The .trybe/requirements.json
file must have the following structure:
{
"requirements": [{
"description": "fetchItem mutation test",
"bonus": false
}]
}
Each new .test.js
file must have an equivalent requirement
.