-
Notifications
You must be signed in to change notification settings - Fork 28
99 lines (99 loc) · 2.67 KB
/
build-lint-test.yml
File metadata and controls
99 lines (99 loc) · 2.67 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
name: build-lint-test
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v2
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: corepack enable
- run: yarn install --immutable
- name: generate
run: cd packages/module && yarn generate
- name: Build dist
run: yarn build
lint:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
needs: build
steps:
- uses: actions/checkout@v2
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: corepack enable
- run: yarn install --immutable
- name: ESLint
run: yarn lint:js
- name: MDLint
run: yarn lint:md
test_jest:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
needs: build
steps:
- uses: actions/checkout@v2
# Yes, we really want to checkout the PR
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: corepack enable
- run: yarn install --immutable
- name: generate
run: cd packages/module && yarn generate
- name: Build dist
run: yarn build
- name: PF4 Jest Tests
run: yarn test --maxWorkers=2
test_a11y:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
needs: build
steps:
- uses: actions/checkout@v2
# Yes, we really want to checkout the PR
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: corepack enable
- run: yarn install --immutable
- name: generate
run: cd packages/module && yarn generate
- name: Build dist
run: yarn build
- name: Build docs
run: yarn build:docs
- name: A11y tests
run: yarn serve:docs & yarn test:a11y