Skip to content

Commit

Permalink
[4] Add cypress build testing
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHeist committed Jun 24, 2024
1 parent 997300f commit 23c9871
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
app/title_cards/
archives/
assets/
backups/
cards/
cypress/
config/
docs/
fonts/
logs/
modules/.objects/
node_modules/
source/
title_cards/
yml/
Expand All @@ -17,7 +18,12 @@ yaml/
.github
.gitignore
.dockerignore
.ruff.toml
README.md
LICENSE
Dockerfile
Dockerfile.armv7
package.json
package-lock.json
cypress.config.js
._*
44 changes: 44 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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
2 changes: 1 addition & 1 deletion modules/ref/version_webui
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0-alpha.10.1-webui3
v2.0-alpha.10.1-webui4

0 comments on commit 23c9871

Please sign in to comment.