-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (37 loc) · 986 Bytes
/
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
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
lint-test:
name: Lint ${{ matrix.app }}
runs-on: ubuntu-latest
strategy:
matrix:
app:
- frontend
- backend
steps:
- name: Checkout
uses: actions/checkout@v4
# https://github.com/actions/setup-node/issues/480#issuecomment-1915448139
- name: Enable Corepack
run: corepack enable
- name: Set up Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint:${{ matrix.app }} --fix
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: Fix lint problems'
- name: Test
run: pnpm run test:${{ matrix.app }}