Skip to content

Commit

Permalink
ci(mutation test): executar no pull request o teste de mutação apenas…
Browse files Browse the repository at this point in the history
… dos arquivos alterados
  • Loading branch information
PauloGoncalvesBH committed Jan 6, 2021
1 parent f40d609 commit 3043cdd
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/continuous_integration.yml
Expand Up @@ -53,4 +53,22 @@ jobs:
- name: Installation of Node.js dependencies
run: npm ci
- name: API Test
run: npm test
run: npm test

test-mutation-diff:

runs-on: ubuntu-18.04

steps:
- name: Project checkout
uses: actions/checkout@v2
- name: Node.js Setup
uses: actions/setup-node@v1
- name: Installation of Node.js dependencies
run: npm ci
- name: Mutation Test - Changed files in the branch
run: |
git fetch origin trunk:refs/remotes/origin/trunk
npm run test:mutation:diff
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/mutation-test.yml
Expand Up @@ -3,7 +3,7 @@ name: Mutation Test
on:
workflow_dispatch:
push:
pull_request:
branches: [trunk, beta]

jobs:
test-mutation:
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -32,6 +32,7 @@
"start": "node ./src/server.js",
"dev": "cross-env NODE_ENV=serverest-development nodemon ./src/server.js --nodoc",
"test:mutation": "cross-env NODE_ENV=serverest-test stryker run ./test/stryker.conf.js",
"test:mutation:diff": "cross-env NODE_ENV=serverest-test stryker-diff-runner --path ./test/stryker.conf.js --branch trunk",
"test": "cross-env NODE_ENV=serverest-test nyc mocha --config test/.mocharc.js",
"lint": "standard",
"lint:fix": "standard --fix",
Expand Down Expand Up @@ -85,6 +86,7 @@
"semantic-release-docker": "^2.2.0",
"sinon": "^9.2.1",
"standard": "^16.0.3",
"stryker-diff-runner": "^2.2.1",
"supertest": "^6.0.1"
},
"engines": {
Expand Down

0 comments on commit 3043cdd

Please sign in to comment.