Api docs 2 #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |