-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 2.06 KB
/
automated-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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