Skip to content

Commit

Permalink
ops: extract installation from CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr committed Sep 28, 2023
1 parent 1aebd05 commit 3dc7b07
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
# https://docs.cypress.io/guides/continuous-integration/github-actions

name: Cypress integration tests
name: main CI jobs (integration tests)

on: push

jobs:

install:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress install (and build app)
uses: cypress-io/github-action@v6
with:
build: npm run build
runTests: false # do not run tests within install job
- name: Save build folder
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: public


cypress:
runs-on: ubuntu-22.04
needs: install
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download the build folder
uses: actions/download-artifact@v3
with:
name: build
path: public
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm run build
start: npm run serve -- -p 30000
start: npm run serve -- --port 30000
wait-on: 'http://localhost:30000' # quote the url to be safe against YML parsing surprises
config: pageLoadTimeout=100000,baseUrl=http://localhost:30000
config: pageLoadTimeout=15000,baseUrl=http://localhost:30000

0 comments on commit 3dc7b07

Please sign in to comment.