fix(ci): Windows smoke test checks users.json instead of .env #23
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| asm-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install NASM | |
| run: sudo apt-get update && sudo apt-get install -y nasm | |
| - name: Build kura-asm | |
| run: bash asm/build.sh | |
| - name: Smoke test | |
| run: | | |
| test "$(./bin/kura-asm --version | wc -c)" -gt 1 | |
| if [ ! -f .kyto.config ]; then | |
| cp .kyto.config.example .kyto.config | |
| fi | |
| ./bin/kura-asm compile | |
| ./bin/kura-asm check | |
| test -f .env | |
| test "$(wc -c < .env)" -gt 1 | |
| cd examples/minimal | |
| ../../bin/kura-asm compile | |
| ../../bin/kura-asm check | |
| test -f .env | |
| test "$(wc -c < .env)" -gt 1 | |
| test -f generated/users.json | |
| test "$(wc -c < generated/users.json)" -gt 1 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: kura-asm-linux | |
| path: bin/kura-asm | |
| asm-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build kura-asm | |
| shell: pwsh | |
| run: ./asm/build.ps1 | |
| - name: Smoke test | |
| shell: pwsh | |
| run: | | |
| if ((./bin/kura-asm.exe --version | Measure-Object -Character).Characters -le 1) { throw "version output too short" } | |
| if (-not (Test-Path .kyto.config)) { | |
| Copy-Item .kyto.config.example .kyto.config | |
| } | |
| ./bin/kura-asm.exe compile | |
| if (-not (Test-Path generated/users.json)) { throw "users.json missing at repo root" } | |
| if ((Get-Item generated/users.json).Length -le 1) { throw "users.json truncated at repo root" } | |
| ./bin/kura-asm.exe check | |
| Push-Location examples/minimal | |
| ../../bin/kura-asm.exe compile | |
| ../../bin/kura-asm.exe check | |
| if (-not (Test-Path generated/users.json)) { throw "users.json missing in minimal example" } | |
| if ((Get-Item generated/users.json).Length -le 1) { throw "users.json truncated in minimal example" } | |
| Pop-Location | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: kura-asm-windows | |
| path: bin/kura-asm.exe |