-
Notifications
You must be signed in to change notification settings - Fork 21
84 lines (69 loc) · 1.91 KB
/
checks.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
name: checks
on:
push:
branches: [main]
pull_request_target:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
# test:
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
# name: test (${{ matrix.os }})
# runs-on: ${{ matrix.os }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup pnpm
# uses: ./.github/actions/setup-pnpm
# - name: Run tests with xvfb
# uses: coactions/setup-xvfb@v1
# with:
# run: pnpm test
lint:
name: ${{ matrix.script }}
strategy:
fail-fast: false
matrix:
script: [lint, typecheck, knip]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
- name: Build
if: ${{ matrix.script == 'typecheck' }}
run: pnpm run build
- name: Run ${{ matrix.script }}
run: pnpm run ${{ matrix.script }}
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v4
- name: Checkout (pull_request_target)
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
- name: Format
run: pnpm run format
- name: Commit changes
if: ${{ always() }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
push_options: "--force-with-lease"