-
Notifications
You must be signed in to change notification settings - Fork 422
55 lines (46 loc) · 1.21 KB
/
main.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
name: Lint
on:
pull_request:
branches:
- master
push:
branches:
- master
concurrency:
group: ${{ github.ref }}-js
cancel-in-progress: true
jobs:
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
verify-package-source:
name: Lint package
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Pull dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('./package.json') }}
- name: Pull example node modules
id: cache-example-npm
uses: actions/cache@v3
env:
cache-name: cached-example-npm-deps
with:
path: example/node_modules
key: ${{ hashFiles('./example/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
- name: Lint files
run: yarn lint
- name: Typecheck files
run: yarn typescript
- name: Build package
run: yarn prepare