-
Notifications
You must be signed in to change notification settings - Fork 11
40 lines (37 loc) · 1.02 KB
/
Copy pathci.yml
File metadata and controls
40 lines (37 loc) · 1.02 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.prepare.outputs.paths }}
steps:
- uses: actions/checkout@v6
- id: prepare
shell: bash
run: |
paths="$(find . -mindepth 1 -maxdepth 1 -type d -name 'pi-*' -printf '%f\n' | jq -Rnc '[inputs]')"
echo "paths=$paths" >> "$GITHUB_OUTPUT"
check:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
path: ${{ fromJson(needs.prepare.outputs.paths) }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
cache-dependency-path: ${{ matrix.path }}/package-lock.json
- run: npm ci
working-directory: ${{ matrix.path }}
- run: npm run lint --if-present
working-directory: ${{ matrix.path }}
- run: npm run typecheck --if-present
working-directory: ${{ matrix.path }}