-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (41 loc) · 1.06 KB
/
pr-lint.yaml
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
name: Pull Request Linter
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
lint-title:
name: Lint pull request title
runs-on: ubuntu-latest
steps:
- name: Lint pull request title
uses: jef/conventional-commits-pr-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
lint-code:
name: 👁️ Validate code
runs-on: ubuntu-latest
steps:
- name: 👀 Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: 🌈 Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: yarn.lock
- name: 📦 Install Dependencies
run: yarn install --frozen-lockfile
- name: 🏭 Build project
run: yarn build
- name: 🚦 Check typescript errors
run: npx tsc --noEmit
- name: 🚦 Lint and fix
run: yarn lint
- name: 🧪 Run tests
run: yarn test