Cypress Tests #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress Tests | |
on: | |
schedule: | |
- cron: "0 0/6 * * 1-5" | |
pull_request: | |
types: [opened, synchronize, reopened, edited] | |
paths-ignore: | |
- ".github/workflows/**" | |
- "!.github/workflows/automated-tests.yml" | |
- ".gitignore" | |
- ".prettierignore" | |
- ".prettierrc.json" | |
- "PULL_REQUEST_TEMPLATE.md" | |
- "README.md" | |
workflow_dispatch: | |
jobs: | |
cypress-run: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Uplink Web directory π | |
uses: actions/checkout@v4 | |
with: | |
repository: Satellite-im/UplinkWeb | |
submodules: "true" | |
- name: Checkout Automated Tests directory π | |
uses: actions/checkout@v4 | |
with: | |
path: automated-tests | |
- name: Setup Node.js for Uplink Web π¨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
cache-dependency-path: | | |
package-lock.json | |
automated-tests/package-lock.json | |
- name: Cache NPM dependencies π¨ | |
uses: actions/cache@v4 | |
id: cache-test | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
- name: Install NPM dependencies for Uplink Web π¦ | |
if: steps.cache-test.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Run server | |
run: npm run dev & | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
wait-on: "http://localhost:5173/" | |
working-directory: automated-tests | |
- name: Upload screenshots and videos from failed tests π· | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-artifacts | |
path: | | |
automated-tests/cypress/screenshots | |
automated-tests/cypress/videos |