Skip to content

Commit

Permalink
ops: use different port on CI
Browse files Browse the repository at this point in the history
and change task defs so `test` is just Cypress, and `test:serve` will
start the server and then run Cypress
  • Loading branch information
alxndr committed Nov 22, 2024
1 parent 828e125 commit 712e6dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npm run develop -- --port 30000 # this will JIT-compile content, which current saves time vs a full build/serve of the site, since our test suite covers only a small portion of the finished files
wait-on: 'http://localhost:30000' # quote the url to be safe against YML parsing surprises
command: npm run test:cypress
config: pageLoadTimeout=100000,baseUrl=http://localhost:30000
start: npm run develop -- --port 3000 # this will JIT-compile content, which current saves time vs a full build/serve of the site, since our test suite covers only a small portion of the finished files
wait-on: 'http://localhost:3000' # quote the url to be safe against YML parsing surprises
config: pageLoadTimeout=15000,baseUrl=http://localhost:3000
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"serve": "gatsby serve",
"prestart": "npm run data:updateShows",
"start": "gatsby develop",
"test": "start-server-and-test http://localhost:8000 test:cypress",
"test:cypress": "cypress run"
"test:serve": "start-server-and-test http://localhost:8000 'npm run test -- --config baseUrl=http://localhost:8000'",
"test": "cypress run"
},
"dependencies": {
"gatsby": "5.13.7",
Expand Down

0 comments on commit 712e6dd

Please sign in to comment.