Skip to content

Commit 5c62571

Browse files
committed
chore: Run checks on PRs against 5.x and add node 18
1 parent 1812a3d commit 5c62571

File tree

1 file changed

+51
-49
lines changed

1 file changed

+51
-49
lines changed

.github/workflows/build.yml

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,79 @@
1-
21
name: CI
32

43
on:
54
push:
65
branches:
76
- 5.x
7+
pull_request:
8+
branches:
9+
- 5.x
810

911
env:
10-
NODE_VERSION: 16
12+
NODE_VERSION: 18
1113

1214
jobs:
1315
tests:
1416
strategy:
1517
matrix:
16-
node: [ '12', '14', '16' ]
18+
node: ['12', '14', '16', '18']
1719
name: Unit tests (Node v${{ matrix.node }})
1820
runs-on: ubuntu-latest
1921

2022
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v2
23+
- name: Checkout
24+
uses: actions/checkout@v2
2325

24-
- name: Setup Node.js
25-
uses: actions/setup-node@v2
26-
with:
27-
node-version: ${{ matrix.node }}
28-
cache: 'yarn'
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: ${{ matrix.node }}
30+
cache: 'yarn'
2931

30-
- name: Cache node_modules
31-
uses: actions/cache@v2
32-
id: cache-nodemodules
33-
with:
34-
path: node_modules
35-
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
32+
- name: Cache node_modules
33+
uses: actions/cache@v2
34+
id: cache-nodemodules
35+
with:
36+
path: node_modules
37+
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
3638

37-
- name: Install dependencies
38-
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
39-
run: yarn install --frozen-lockfile --non-interactive
39+
- name: Install dependencies
40+
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
41+
run: yarn install --frozen-lockfile --non-interactive
4042

41-
- name: Build
42-
run: yarn build
43+
- name: Build
44+
run: yarn build
4345

44-
- name: Unit tests
45-
run: yarn test --ci
46+
- name: Unit tests
47+
run: yarn test --ci
4648

4749
lint:
4850
name: Lint
4951
runs-on: ubuntu-latest
5052

5153
steps:
52-
- name: Checkout
53-
uses: actions/checkout@v2
54-
55-
- name: Setup Node.js
56-
uses: actions/setup-node@v2
57-
with:
58-
node-version: ${{ env.NODE_VERSION }}
59-
cache: 'yarn'
60-
61-
- name: Cache node_modules
62-
uses: actions/cache@v2
63-
id: cache-nodemodules
64-
with:
65-
path: node_modules
66-
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
67-
68-
- name: Install dependencies
69-
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
70-
run: yarn install --frozen-lockfile --non-interactive
71-
72-
- name: Install website dependencies
73-
run: yarn install --frozen-lockfile --non-interactive
74-
working-directory: ./website
75-
76-
- name: Lint
77-
run: yarn lint
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
57+
- name: Setup Node.js
58+
uses: actions/setup-node@v2
59+
with:
60+
node-version: ${{ env.NODE_VERSION }}
61+
cache: 'yarn'
62+
63+
- name: Cache node_modules
64+
uses: actions/cache@v2
65+
id: cache-nodemodules
66+
with:
67+
path: node_modules
68+
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
69+
70+
- name: Install dependencies
71+
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
72+
run: yarn install --frozen-lockfile --non-interactive
73+
74+
- name: Install website dependencies
75+
run: yarn install --frozen-lockfile --non-interactive
76+
working-directory: ./website
77+
78+
- name: Lint
79+
run: yarn lint

0 commit comments

Comments
 (0)