-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (73 loc) · 2.06 KB
/
ci.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
name: CI/Release
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build project
run: zig build
- name: Run Zig unit tests
run: zig build test
- name: Run HTT template tests
run: ./zig-out/bin/htt tests/tpl/run_tests.lua
- name: Run API unit tests
run: ./zig-out/bin/htt tests/unit/run_tests.lua
- name: Regenerate generated assets
run: ./zig-out/bin/htt build.lua
- name: Check for modified files
run: |
if ! git diff --quiet; then
echo "Error: Generated files are not up to date. Please regenerate files locally and commit changes."
git diff
exit 1
fi
test-windows:
needs: test-linux
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Debug Git
shell: bash
run: |
which git
git --version
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build project
run: zig build
- name: Run Zig unit tests
run: zig build test
- name: Run HTT template tests
shell: bash
run: ./zig-out/bin/htt.exe tests/tpl/run_tests.lua
- name: Run API unit tests
shell: bash
run: ./zig-out/bin/htt.exe tests/unit/run_tests.lua
test-macos:
needs: test-linux
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build project
run: zig build
- name: Run Zig unit tests
run: zig build test
- name: Run HTT template tests
run: ./zig-out/bin/htt tests/tpl/run_tests.lua
- name: Run API unit tests
run: ./zig-out/bin/htt tests/unit/run_tests.lua