Skip to content

Commit

Permalink
Add Cypress Cloud integration
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Sep 26, 2024
1 parent 1b92196 commit e803019
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 160 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Cypress Tests
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
# Also see warning here https://github.com/cypress-io/github-action#parallel
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
# matrix:
# containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Set up Ruby for Jekyll
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.3

- name: Install dependencies with Yarn
run: |
yarn install
yarn after-install
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
start: yarn start
wait-on: 'http://localhost:4000/design-system/' # Waits for above
# When true, records to Cypress Cloud.
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: false
browser: firefox
parallel: false # When true, runs test in parallel using settings above
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 0 additions & 59 deletions .github/workflows/sauce.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .sauce/config.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .sauceignore

This file was deleted.

1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'cypress';

export default defineConfig({
projectId: '2hroh3',
e2e: {
baseUrl: 'http://127.0.0.1:4000/design-system/',
defaultCommandTimeout: 40000,
Expand Down
Binary file not shown.
Binary file removed npm-packages-offline-cache/adm-zip-0.5.15.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/saucectl-0.186.0.tgz
Binary file not shown.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"serve-decap": "npx decap-server",
"start": "yarn build && concurrently --kill-others \"yarn serve-decap\" \"yarn serve-jekyll\" \"yarn build watch\"",
"jest": "yarn node --experimental-vm-modules $(yarn bin jest)",
"test:browser": "yarn cypress run",
"test:browser:cloud": ": ${SAUCE_USERNAME?\"You need to define SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables \"} && node_modules/saucectl/bin/saucectl run"
"test:browser": "yarn cypress run"
},
"browserslist": "> 0.2% in @cfpb/browserslist-config stats",
"dependencies": {
Expand Down Expand Up @@ -84,7 +83,6 @@
"prettier": "3.3.3",
"prop-types": "15.8.1",
"sass": "1.79.2",
"saucectl": "0.186.0",
"stylelint": "16.9.0",
"stylelint-config-standard-scss": "13.1.0",
"svgo": "3.3.0"
Expand Down
26 changes: 2 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1618,16 +1618,6 @@
redux-thunk "^2.4.2"
reselect "^4.1.8"

"@saucelabs/bin-wrapper@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@saucelabs/bin-wrapper/-/bin-wrapper-2.1.0.tgz#f958b91b5460342bc27e51e820826e5e8172e5ac"
integrity sha512-3imJcMxRmWAkWnPwrU8/TQIeKft2wQH0U4hadgAUWU4XXM9V2i1k4GyeUZwB/exnt9krRoBov/w3wzGtNxXhdA==
dependencies:
adm-zip "^0.5.14"
axios "^1.7.2"
https-proxy-agent "^7.0.4"
tar-stream "^3.1.7"

"@sentry/core@6.19.7":
version "6.19.7"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.19.7.tgz#156aaa56dd7fad8c89c145be6ad7a4f7209f9785"
Expand Down Expand Up @@ -2102,11 +2092,6 @@ add-stream@^1.0.0:
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==

adm-zip@^0.5.14:
version "0.5.15"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.15.tgz#c2c9b3d4f3b1c911e72b2394e84fd91bcc81e08e"
integrity sha512-jYPWSeOA8EFoZnucrKCNihqBjoEGQSU4HKgHYQgKNEQ0pQF9a/DYuo/+fAxY76k4qe75LUlLWpAM1QWcBMTOKw==

agent-base@6, agent-base@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
Expand Down Expand Up @@ -6100,7 +6085,7 @@ https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
agent-base "6"
debug "4"

https-proxy-agent@^7.0.1, https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.4, https-proxy-agent@^7.0.5:
https-proxy-agent@^7.0.1, https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5:
version "7.0.5"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2"
integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==
Expand Down Expand Up @@ -10649,13 +10634,6 @@ sass@^1.69.5:
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"

saucectl@0.186.0:
version "0.186.0"
resolved "https://registry.yarnpkg.com/saucectl/-/saucectl-0.186.0.tgz#29c5d25fbeb4f47919bd93e048d1884dde5fc0f2"
integrity sha512-jvZ/dsKj8Luk68BjAk2D0O/1cuKNy2m843AhsoE1OoMJTx4XPZLICLKLOAvpVKxSpAVovXu8LQAfckQ4I0zZYA==
dependencies:
"@saucelabs/bin-wrapper" "^2.1.0"

saxes@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5"
Expand Down Expand Up @@ -11510,7 +11488,7 @@ tar-fs@^3.0.6:
bare-fs "^2.1.1"
bare-path "^2.1.0"

tar-stream@^3.1.5, tar-stream@^3.1.7:
tar-stream@^3.1.5:
version "3.1.7"
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b"
integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==
Expand Down

0 comments on commit e803019

Please sign in to comment.