Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cypress Cloud integration #2059

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 removed npm-packages-offline-cache/@octokit-types-13.5.1.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/adm-zip-0.5.16.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/axios-1.7.7.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/nwsapi-2.2.12.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/nwsapi-2.2.13.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 @@ -35,8 +35,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 @@ -80,7 +79,6 @@
"prop-types": "15.8.1",
"release-it": "17.6.0",
"sass": "1.79.3",
"saucectl": "0.186.0",
"stylelint": "16.9.0",
"stylelint-config-standard-scss": "13.1.0",
"svgo": "3.3.0"
Expand Down
47 changes: 8 additions & 39 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1187,9 +1187,9 @@
"@octokit/plugin-rest-endpoint-methods" "13.2.2"

"@octokit/types@^13.0.0", "@octokit/types@^13.1.0", "@octokit/types@^13.5.0":
version "13.5.1"
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.5.1.tgz#5685a91f295195ddfff39723b093b0df9609ce6e"
integrity sha512-F41lGiWBKPIWPBgjSvaDXTTQptBujnozENAK3S//nj7xsFdYdirImKlBB/hTjr+Vii68SM+8jG3UJWRa6DMuDA==
version "13.6.0"
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.0.tgz#db13d345cc3fe1a0f7c07171c724d90f2b55f410"
integrity sha512-CrooV/vKCXqwLa+osmHLIMUb87brpgUqlqkPGc6iE2wCkUvTrHiXFMhAKoDDaAAYJrtKtrFTgSQTg5nObBEaew==
dependencies:
"@octokit/openapi-types" "^22.2.0"

Expand Down Expand Up @@ -1263,16 +1263,6 @@
redux-thunk "^2.4.2"
reselect "^4.1.8"

"@saucelabs/bin-wrapper@^2.1.0":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@saucelabs/bin-wrapper/-/bin-wrapper-2.1.1.tgz#bd38e71f8f9c36e6e3c4217ce94d01e7c38c7bf6"
integrity sha512-wzG3tx5wOmzFxdKqCUAq7aPR0zHk6PIiV+rGjTJMApyGyJtjAWSXPGzdfejio06A6sdBNkDeZXm/Fb+yR3h8Bg==
dependencies:
adm-zip "^0.5.15"
axios "^1.7.5"
https-proxy-agent "^7.0.5"
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 @@ -1645,11 +1635,6 @@ acorn@^8.1.0, acorn@^8.11.0, acorn@^8.8.1, acorn@^8.9.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==

adm-zip@^0.5.15:
version "0.5.16"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.16.tgz#0b5e4c779f07dedea5805cdccb1147071d94a909"
integrity sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==

agent-base@6:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
Expand Down Expand Up @@ -2124,15 +2109,6 @@ axe-core@^4.9.1:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59"
integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==

axios@^1.7.5:
version "1.7.7"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f"
integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axobject-query@^3.2.1:
version "3.2.4"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.4.tgz#6dfba930294ea14d7d2fc68b9d007211baedb94c"
Expand Down Expand Up @@ -4632,7 +4608,7 @@ focus-group@^0.3.1:
resolved "https://registry.yarnpkg.com/focus-group/-/focus-group-0.3.1.tgz#e0f32ed86b0dabdd6ffcebdf898ecb32e47fedce"
integrity sha512-IA01dzk2cStQso/qnt2rWhXCFBZlBfjZmohB9mXUx9feEaJcORAK0FQGvwaApsNNGwzEnqrp/2qTR4lq8PXfnQ==

follow-redirects@^1.0.0, follow-redirects@^1.15.6:
follow-redirects@^1.0.0:
version "1.15.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==
Expand Down Expand Up @@ -7562,9 +7538,9 @@ nth-check@^2.0.1:
boolbase "^1.0.0"

nwsapi@^2.2.2:
version "2.2.12"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8"
integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==
version "2.2.13"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.13.tgz#e56b4e98960e7a040e5474536587e599c4ff4655"
integrity sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==

object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
Expand Down Expand Up @@ -9153,13 +9129,6 @@ sass@1.79.3, 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 @@ -9938,7 +9907,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