Switch to cypress orb

This commit is contained in:
2022-11-15 19:21:19 -06:00
parent 6bd4c16a4d
commit f9f346f063

View File

@ -1,11 +1,10 @@
version: 2.1 version: 2.1
orbs: orbs:
node: circleci/node@5.0.2 cypress: cypress-io/cypress@1
jobs: jobs:
test: setup:
executor: node/default
steps: steps:
- checkout - checkout
- run: - run:
@ -15,24 +14,20 @@ jobs:
echo "NPM_TOKEN=${NPM_TOKEN}" >> .npmrc echo "NPM_TOKEN=${NPM_TOKEN}" >> .npmrc
echo "@OWNER:registry=https://npm.pkg.github.com/" >> .npmrc echo "@OWNER:registry=https://npm.pkg.github.com/" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${NPM_TOKEN}" >> .npmrc echo "//npm.pkg.github.com/:_authToken=${NPM_TOKEN}" >> .npmrc
cat .npmrc
- node/install:
node-version: '16.13'
- node/install-packages:
pkg-manager: npm
- run:
name: Start web server
command: npm run start
background: true
- run:
name: Run cypress tests
command: |
## curl --retry-delay 5 --retry 10 --retry-connrefused https://localhost:3000
sleep 60
npm run cypress:run
workflows: workflows:
test: build:
jobs: jobs:
- test: - setup:
context: [ qqq-maven-registry-credentials ] context: [ qqq-maven-registry-credentials ]
- cypress/install:
build: 'npm run build' # run a custom app build step
- cypress/run:
requires:
- cypress/install
record: true # record results on Cypress Dashboard
## parallel: true # split all specs across machines
## parallelism: 4 # use 4 CircleCI machines to finish quickly
## group: 'all tests' # name this group "all tests" on the dashboard
start: 'npm run start' # start server before running tests