Skip to content

[15] Improve updating and installation docs #5

[15] Improve updating and installation docs

[15] Improve updating and installation docs #5

Workflow file for this run

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:
# Pull tests from cypress branch since they're excluded from the container
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
cypress
package.json
package-lock.json
cypress.config.js
# Launch TCM container
- run: |
mkdir config
docker login "ghcr.io" -u "CollinHeist" -p "${{ secrets.GHCR_PASSWORD }}"
docker run -itd -p 4242:4242 -v "./config":"/config" "ghcr.io/titlecardmaker/titlecardmaker-webui:latest"
# Install cypress dependencies
- run: >
sudo apt-get update &&
sudo apt-get install -y --no-install-recommends
libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev
libnss3 libxss1 libasound2 libxtst6 xauth xvfb
# Install node
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
# Install npm dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npm run cy:run
wait-on: http://localhost:4242
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
parallel: true # Runs test in parallel using settings above
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}