From 006d8690e63906881359adf53c012e3f7aa2b7d7 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:21:38 +0200 Subject: [PATCH] ci: convert linux tests for Node.js 20 (#859) --- .circleci/config.yml | 95 ++++++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 39 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ad90c8916..2d39bfaaf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -146,6 +146,56 @@ jobs: start-command: 'npm run start' cypress-command: 'npx cypress run --record --group Mac build' + linux-test: + # checks out code and installs dependencies once + # runs on 3 machines, load balances tests + # and records on Cypress Cloud + parallelism: 3 + executor: + name: cypress/default + node-version: '20.13.1' + steps: + - cypress/install: + post-install: 'npm run build' + - cypress/run-tests: + start-command: 'npm run start' + cypress-command: 'npx cypress run --record --parallel --group 3x-electron on CircleCI' + - run: npx cypress cache path + - run: npx cypress cache list + - run: npx cypress info + # let's print version info + - run: npx cypress version + - run: npx cypress version --component package + - run: npx cypress version --component binary + - run: npx cypress version --component electron + - run: npx cypress version --component node + + linux-test-chrome: + # runs on 2 machines using Chrome browser + parallelism: 2 + executor: + name: cypress/default + node-version: '20.13.1' + steps: + - cypress/install: + install-browsers: true + - cypress/run-tests: + start-command: 'npm run start' + cypress-command: 'npx cypress run --browser chrome --record --parallel --group 2x-chrome on CircleCI' + + linux-test-firefox: + # runs on 2 machines using Firefox browser + parallelism: 2 + executor: + name: cypress/default + node-version: '20.13.1' + steps: + - cypress/install: + install-browsers: true + - cypress/run-tests: + start-command: 'npm run start' + cypress-command: 'npx cypress run --browser firefox --record --parallel --group 2x-chrome on CircleCI' + release: executor: name: cypress/default @@ -167,42 +217,9 @@ workflows: linux-build: jobs: - # checks out code and installs dependencies once - # runs on 3 machines, load balances tests - # and records on Cypress Cloud - - cypress/run: - name: '3 machines' - post-install: 'npm run build' - start-command: 'npm run start' - cypress-command: 'npx cypress run --record --parallel --group 3x-electron on CircleCI' - parallelism: 3 - post-steps: - # show Cypress cache folder and binary versions - # to check if we are caching previous binary versions - - run: npx cypress cache path - - run: npx cypress cache list - - run: npx cypress info - # let's print version info - - run: npx cypress version - - run: npx cypress version --component package - - run: npx cypress version --component binary - - run: npx cypress version --component electron - - run: npx cypress version --component node - - # run on 2 machines using Chrome browser - - cypress/run: - name: '2 machines using Chrome' - start-command: 'npm run start' - install-browsers: true - cypress-command: 'npx cypress run --browser chrome --record --parallel --group 2x-chrome on CircleCI' - parallelism: 2 - - - cypress/run: - name: '2 machines using Firefox' - start-command: 'npm run start' - install-browsers: true - cypress-command: 'npx cypress run --browser firefox --record --parallel --group 2x-firefox on CircleCI' - parallelism: 2 + - linux-test + - linux-test-chrome + - linux-test-firefox - release: filters: @@ -210,6 +227,6 @@ workflows: only: - master requires: - - 3 machines - - 2 machines using Chrome - - 2 machines using Firefox + - linux-test + - linux-test-chrome + - linux-test-firefox