Repository navigation
127 lines (105 loc) · 4.39 KB
/
Copy pathchecks.yml
File metadata and controls
127 lines (105 loc) · 4.39 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: checks
# Jobs that need no cloud credentials: every pull request (also from forks) and every push to `main`
# or to a maintenance branch (`v9`, `v10`, ...). For a push, GitHub reads this file from the pushed
# branch, so a maintenance branch made from `main` gets this filter.
on:
push:
branches:
- main
- "v[0-9]*"
pull_request:
paths-ignore:
- "**/*.md"
workflow_dispatch:
permissions:
contents: read
pull-requests: read
# Pull requests: one group per pull request, so a new commit cancels the run of the previous commit.
# Push (`main` and the maintenance branches) and manual runs: one group per run. GitHub keeps only one
# pending run per group, so a shared group would skip some merged commits. Thus each merged commit is tested.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true
jobs:
unit-test:
name: 🧪 Lint and unit tests
runs-on: ubuntu-latest
# Usually less than 2 minutes. Without a limit, a hung job runs until the GitHub default of 6 hours
timeout-minutes: 10
steps:
- name: ⬇️ Checkout Repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 📦 Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- name: 🟢 Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: 🧩 Install Dependencies
run: pnpm install --frozen-lockfile
- name: 🏗️ Build
working-directory: ./
run: pnpm build
- name: 🧪 Run linting and unit tests
working-directory: ./
run: pnpm test
local-chrome:
name: 💻 Run WebdriverIO v10 Tests on local headless Chrome
runs-on: ubuntu-latest
# Usually less than 3 minutes. Without a limit, a hung job runs until the GitHub default of 6 hours
timeout-minutes: 15
steps:
- name: ⬇️ Checkout Repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 📦 Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- name: 🟢 Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: 🧩 Install Dependencies
run: pnpm install --frozen-lockfile
- name: 🏗️ Build
working-directory: ./
run: pnpm build
- name: 💻 Run WebdriverIO v10 e2e tests on local headless Chrome
working-directory: ./
run: pnpm test.local.chrome.v10
- name: 💻 Run WebdriverIO v10 e2e tests with Jasmine on local headless Chrome
working-directory: ./
run: pnpm test.local.chrome.v10.jasmine
- name: 💻 Run WebdriverIO v10 multiremote e2e tests on local headless Chrome
working-directory: ./
run: pnpm test.local.desktop.multi
- name: 💻 Run WebdriverIO v10 Chrome mobile emulation e2e tests on local headless Chrome
working-directory: ./
run: pnpm test.local.chrome.v10.emulation
# The baselines of these specs are not in git: the setup run saves them, then the real run compares
- name: 💻 Save the baselines of the desktop e2e tests on local headless Chrome
working-directory: ./
run: pnpm test.local.desktop
env:
BASELINE_SETUP: "true"
- name: 💻 Run the desktop e2e tests on local headless Chrome
working-directory: ./
run: pnpm test.local.desktop
# A local page with a committed font. The cloud OCR job (e2e workflow) tests the same commands on a website
- name: 🔍 Run the OCR e2e tests on local headless Chrome
working-directory: ./
run: pnpm test.ocr.local.desktop
- name: 📤 Upload artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: failure()
with:
name: ci-pr-local-chrome-logs
include-hidden-files: true
path: |
logs/*.log
.tmp/
localBaseline/