Skip to content

Commit

Permalink
ci: prevent duplicate CI tasks on creating a PR
Browse files Browse the repository at this point in the history
BrowserStack can be flaky when there are multiple concurrent jobs running on
it. This commit makes sure that only 1 browser can run concurrently during the
`npm run test:client` jobs and that the "Test" GitHub Action workflow is only
trigerred once when creating a PR; having the `on: push` configuration made it
so that GH triggers two duplicate jobs when a PR is opened.
  • Loading branch information
Jonathan Ginsburg committed Feb 5, 2022
1 parent c97e562 commit 653c762
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Test

on:
push:
branches-ignore:
- master
pull_request:
branches:
- master
Expand Down Expand Up @@ -38,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 10, 12 ]
node: [10, 12]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion test/client/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module.exports = function (config) {
'karma-browserstack-launcher'
],

concurrency: 2,
concurrency: 1,

forceJSONP: true,

Expand Down

0 comments on commit 653c762

Please sign in to comment.