-
Notifications
You must be signed in to change notification settings - Fork 67
69 lines (52 loc) · 1.58 KB
/
test.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
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set ignore engines
run: yarn config set ignore-engines true
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn
- name: Validate
run: yarn lint
- name: Check prettier
run: yarn prettier:check
- name: Bundle size
run: |
GITHUB_RUN_NUMBER_TMP=GITHUB_RUN_NUMBER && export GITHUB_RUN_NUMBER=1;
echo "$GITHUB_RUN_NUMBER"
yarn bundlesize
export GITHUB_RUN_NUMBER=GITHUB_RUN_NUMBER_TMP
echo "$GITHUB_RUN_NUMBER"
- name: Build source for remainder tests
run: yarn build
# Needs to run after `yarn build` so that `packages/webpack-loader/`
# tests can resolve `@compiled/react/runtime` correctly.
- name: Run tests
run: yarn test:cover --ci
- name: Run import test
run: yarn test:imports
- name: Run parcel tests
run: yarn test:parcel