From 653c762be4fa464fed5bfa306317b84cc5c28a17 Mon Sep 17 00:00:00 2001 From: Jonathan Ginsburg Date: Fri, 4 Feb 2022 18:07:39 -0600 Subject: [PATCH] ci: prevent duplicate CI tasks on creating a PR 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. --- .github/workflows/test.yml | 5 +---- test/client/karma.conf.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 47e0882ae..82d51b1b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,6 @@ name: Test on: - push: - branches-ignore: - - master pull_request: branches: - master @@ -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 diff --git a/test/client/karma.conf.js b/test/client/karma.conf.js index 454d40d9e..edf0bdb19 100644 --- a/test/client/karma.conf.js +++ b/test/client/karma.conf.js @@ -124,7 +124,7 @@ module.exports = function (config) { 'karma-browserstack-launcher' ], - concurrency: 2, + concurrency: 1, forceJSONP: true,