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

adjust CI #30

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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
Copy link
Member Author

@alxndr alxndr Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but is way overkill for what our tests are doing, because currently we're only using a handful of pages in the test suite. It ends up taking several minutes for GitHub to upload and then re-download these files through however they do that...

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