-
Notifications
You must be signed in to change notification settings - Fork 326
59 lines (52 loc) · 1.47 KB
/
regression.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
name: Run regression tests
on:
pull_request:
paths:
- ".github/workflows/regression.yml"
- "package*.json"
- "test/**"
- "content/**/examples/**"
- "!content/landmarks/examples/**"
push:
branches-ignore:
- main
- "dependabot/**"
paths:
- ".github/workflows/regression.yml"
- "package*.json"
- "test/**"
- "content/**/examples/**"
- "!content/landmarks/examples/**"
jobs:
regression:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
CI_NODE_INDEX: [0, 1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Run Ava on changed files in PR
run: ./scripts/regression-tests.sh
if: github.event_name == 'pull_request'
env:
COMMIT_RANGE: "origin/${{ github.base_ref }}...${{ github.sha }}"
CI_NODE_TOTAL: 5
CI_NODE_INDEX: ${{ matrix.CI_NODE_INDEX }}
TEST_WAIT_TIME: 10000
- name: Run Ava for changed files from origin branch
run: ./scripts/regression-tests.sh
if: github.event_name == 'push'
env:
COMMIT_RANGE: "origin/main...${{ github.ref }}"
CI_NODE_TOTAL: 5
CI_NODE_INDEX: ${{ matrix.CI_NODE_INDEX }}
TEST_WAIT_TIME: 10000