-
Notifications
You must be signed in to change notification settings - Fork 43
134 lines (104 loc) · 3.43 KB
/
Copy pathon-pull-request.yaml
File metadata and controls
134 lines (104 loc) · 3.43 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
128
129
130
131
132
133
name: Test
on:
pull_request:
env:
CONTAINER_CMD: docker
FORKLIFT_PLUGIN_IMAGE: localhost:5001/forklift-console-plugin:latest
OKD_CONSOLE_YAML: ./ci/yaml/okd-console.yaml
jobs:
linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Lint, eslint and stylelint
run: npm run lint
- name: Lint, test i18n files
run: npm run test:i18n
- name: Knip
run: npm run knip
build:
name: Build project
runs-on: ubuntu-latest
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
test:
name: Run tests and coverage
runs-on: ubuntu-latest
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test:coverage
- name: Test coverage
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
e2e:
name: Run e2e tests
runs-on: ubuntu-latest
env:
BASE_ADDRESS: http://localhost:30080
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install testing dependencies
run: cd testing && npm ci
- name: Install Playwright browsers
run: cd testing && npx playwright install --with-deps chromium
- name: Check downstream version gating
run: cd testing && npm run check:version-gating
- name: Run pre e2e test tasks
run: npm run e2e:pre-test
- name: Wait for application
run: |
timeout 300 bash -c 'until curl -f http://localhost:30080; do sleep 5; done'
- name: Run Playwright tests (upstream only)
run: cd testing && npm run test:upstream
env:
BASE_ADDRESS: http://localhost:30080
- name: Upload Playwright test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: playwright-test-results
path: |
testing/test-results/
testing/playwright-report/