Skip to content

[4] Add cypress build testing #1

[4] Add cypress build testing

[4] Add cypress build testing #1

Workflow file for this run

name: Cypress Tests
on: push
jobs:
cypress-run:
runs-on: ubuntu-latest
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