Skip to content

Commit

Permalink
ci: convert linux tests for Node.js 20 (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed Jul 15, 2024
1 parent ae229e6 commit 006d869
Showing 1 changed file with 56 additions and 39 deletions.
95 changes: 56 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -167,49 +217,16 @@ 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:
branches:
only:
- master
requires:
- 3 machines
- 2 machines using Chrome
- 2 machines using Firefox
- linux-test
- linux-test-chrome
- linux-test-firefox

0 comments on commit 006d869

Please sign in to comment.