-
Notifications
You must be signed in to change notification settings - Fork 567
67 lines (57 loc) · 1.37 KB
/
build-qrcode.yml
File metadata and controls
67 lines (57 loc) · 1.37 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
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
name: Build QRCode
on:
push:
pull_request:
branches: [main]
env:
# Workaround for bug in Zig 0.15.2 (fixed in next version)
# https://github.com/ziglang/zig/issues/25805
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-global-cache
jobs:
test:
name: Test (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.15.2
- name: Install dependencies
run: bun install
- name: Build core
run: |
cd packages/core
bun run build
- name: Build
run: |
cd packages/qrcode
bun run build
- name: Run tests
run: |
cd packages/qrcode
bun run test
build-complete:
name: QRCode - Build and Test
needs: [test]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check test results
run: |
if [ "${{ needs.test.result }}" != "success" ]; then
echo "Tests failed"
exit 1
fi
echo "All tests passed"