-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.17 KB
/
on_pull_request_tests.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
name: Tests
on:
pull_request:
paths:
- 'packages/**'
types: [opened, synchronize, reopened, ready_for_review]
jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Setup environment
id: env_setup
uses: bigwoof91/real-system/.github/actions/setup-env@main
- name: Yarn install
if: steps.env_setup.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Run lint
run: yarn lint
- name: Run type checks
run: yarn tscheck
- name: Run tests
run: yarn test
package-size:
name: Diff compressed package sizes
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js 16.16.0
uses: actions/setup-node@master
with:
node-version: 16.16.0
- uses: preactjs/compressed-size-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
build-script: 'build:js'
# only check commonjs files
pattern: '**/lib/**/*.js'
exclude: '{**/*.map,**/node_modules/**,**/*.debug.js,**/*.esm.js}'