-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (67 loc) · 2.15 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: main
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
env:
PRIMARY_NODE_VERSION: 20
jobs:
check-types:
name: check-types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js v${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: pnpm
- name: Install package dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies --ignore-scripts
- name: Check for Type Errors
run: pnpm build:check
eslint:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js v${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: pnpm
- name: Install package dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies --ignore-scripts
- name: Check for ESLint Errors
run: pnpm lint:check
license-checker:
name: license-checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js v${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: pnpm
- name: Install package dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies --ignore-scripts
- name: Install license-checker
run: pnpm install -g license-checker
- name: Check for license violations
run: license-checker --excludePackages "$(echo $(npm pkg get name)@$(npm pkg get version) | sed 's/\"//g')" --production --unknown --onlyAllow='Apache-2.0;BSD;CC0-1.0;ISC;MIT;MPL-2.0;UNLICENSED'