-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (42 loc) · 1.32 KB
/
ci.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
name: ci
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Get diff
id: get-diff
run: |
DIFF=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)
echo "diff=${DIFF}" >> $GITHUB_OUTPUT
- name: Run Prettier
run: npm run prettier
- name: Run ESLint
run: npm run lint
- name: Check TypeScript
run: tsc --noEmit
- name: Run unit tests
run: npx ts-mocha ./test/scripts/*.ts
- name: Check configs
run: npx ts-mocha ./test/check-json-schemas.ts
- name: Check versions.json whitespace
run: npx ts-mocha ./test/check-versions-whitespace.ts
- name: Check file changes
run: npx ts-mocha ./test/check-file-changes.ts --diff="${{ steps.get-diff.outputs.diff }}"
- name: Check releases
run: npx ts-mocha ./test/check-live-release.ts --diff="${{ steps.get-diff.outputs.diff }}"