-
-
Notifications
You must be signed in to change notification settings - Fork 20
47 lines (38 loc) · 1.09 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
name: test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [
# From https://github.com/nodejs/Release
"16.x", # EoL 2023-09-11
"18.x", # EoL 2025-04-30
"20.x", # EoL 2026-04-30
"latest",
]
steps:
- uses: actions/checkout@v3
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Check TypeScript
run: npx tsc
- name: Run tests
run: npm run test
env:
CI: true
- name: Run linters
run: npm run lint
- name: Run NPM package lints
run: |
npm run build
npm run lint:package
# @arethetypeswrong/cli requires Node 18+, it seems?
# See https://github.com/arethetypeswrong/arethetypeswrong.github.io/issues/52
if: ${{ matrix.node-version == '18.x' || matrix.node-version == 'latest' }}