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

Update Cypress workflow #123

Merged
merged 6 commits into from
Jan 31, 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
48 changes: 8 additions & 40 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,17 @@
name: Cypress Tests with Dependency and Artifact Caching
# https://docs.cypress.io/guides/continuous-integration/github-actions

on: workflow_dispatch
on:
push:
branches:
- '*cypress*'
pull_request:
branches: [develop]
workflow_dispatch:

jobs:
install:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: 'npm'

- name: Cypress install
uses: cypress-io/github-action@v6
with:
# Disable running of tests within install job
runTests: false
build: npm run build

- name: Save build folder
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: dist

cypress-run:
runs-on: ubuntu-22.04
needs: install
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -42,18 +21,7 @@ jobs:
with:
node-version: 14.x

- name: Download the build folder
uses: actions/download-artifact@v3
with:
name: build
path: dist

- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npx serve -s dist -p 8080
wait-on: 'http://localhost:8080'
browser: chrome
command: npm run cypress:run-component
# or install start-server-and-test and do:
# run: npm run test-component
component: true
2 changes: 1 addition & 1 deletion .github/workflows/selenium_browser_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# https://github.com/SeleniumHQ/selenium/blob/selenium-4.0.0-beta-3/.github/actions/setup-chrome/action.yml
- name: Prepare Selenium
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list
sudo apt-get update -qqy
sudo apt-get -qqy install google-chrome-stable
Expand Down
Loading
Loading