-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.58 KB
/
build-test.yaml
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
name: Build & Test
on:
workflow_call:
pull_request:
concurrency:
group: ${{ github.event.pull_request.number || github.ref || github.sha }}
cancel-in-progress: true
jobs:
check-and-test:
name: check-and-test-${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(vars.PACKAGES) }}
defaults:
run:
working-directory: packages/${{ matrix.package }}
env:
ARTIFACTS_API_TOKEN: ${{ secrets.ARTIFACTS_API_TOKEN }}
ARTIFACTS_USERNAME: ${{ secrets.ARTIFACTS_USERNAME }}
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
ARTIFACTS_CHARACTER: ${{ secrets.ARTIFACTS_CHARACTER }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- run: bun install --frozen-lockfile
- run: bun check
- run: bun test
build:
name: build-${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(vars.PACKAGES) }}
defaults:
run:
working-directory: packages/${{ matrix.package }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- run: bun install --frozen-lockfile
- run: bun run build
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}-dist
path: packages/${{ matrix.package }}/dist
compression-level: 9
retention-days: 7