Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(mutation test): executar no pull request o teste de mutação apenas dos arquivos alterados #172

Merged
merged 1 commit into from Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.3.0",
"supertest": "^6.0.1"
},
"engines": {
Expand Down