-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (67 loc) · 2.11 KB
/
pull_request.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
75
76
77
78
79
80
81
82
83
84
85
name: Pull Request Validation
concurrency:
group: pull_request_${{ github.event.number }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
jobs:
pr-review:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Begin CI...
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.13.2'
- name: Install dependencies without generating a lockfile and fail if an update is needed
run: yarn --frozen-lockfile
- name: Danger JS Action
uses: danger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
lint-check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Begin CI...
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.13.2'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies without generating a lockfile and fail if an update is needed
run: yarn --frozen-lockfile
- name: Run Eslint validation
run: yarn lint
run-e2e-tests:
if: github.event.pull_request.draft == false
needs:
- pr-review
- lint-check
strategy:
fail-fast: false
matrix:
jobs: [0, 1, 2, 3, 4]
uses: ./.github/workflows/automation_exec.yml
with:
log_level: info
suite: ci.pull_request
spec_ci_index: ${{ matrix.jobs }}
spec_ci_total: 5
max_instances: 3
chrome_instances: 2
browser_visible: true
enable_video: false