Skip to content

chore(cypress): add workflow to run tests #3

chore(cypress): add workflow to run tests

chore(cypress): add workflow to run tests #3

Workflow file for this run

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: ubuntu-22.04
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 Automated Tests πŸ”¨
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: automated-tests/yarn.lock
- name: Setup Node.js for Uplink Web πŸ”¨
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: package-lock.json
- name: Cache NPM dependencies πŸ”¨
uses: actions/cache@v4
id: cache-uplink
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Cache Yarn dependencies πŸ”¨
uses: actions/cache@v4
id: cache-cypress
with:
path: automated-tests/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
- name: Install Yarn dependencies for Cypress Tests πŸ“¦
if: steps.cache-cypress.outputs.cache-hit != 'true'
working-directory: automated-tests
run: yarn install --frozen-lockfile
- name: Install NPM dependencies for Uplink Web πŸ“¦
if: steps.cache-uplink.outputs.cache-hit != 'true'
run: npm ci
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npm run dev
working-directory: automated-tests