add more robust error handling #24
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, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| name: Test (non-engine-consistency) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Lua | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lua5.4 | |
| - name: Run tests | |
| run: TEST_IGNORE_SLUGS=engine_consistency_integration lua5.4 ./bin/test.lua | |
| discover-engines: | |
| name: Discover Engines | |
| runs-on: ubuntu-latest | |
| outputs: | |
| engines: ${{ steps.list_engines.outputs.engines }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Lua | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lua5.4 | |
| - name: List available engines | |
| id: list_engines | |
| run: | | |
| ENGINES=$(lua5.4 bin/engines.lua) | |
| echo "engines=$ENGINES" >> $GITHUB_OUTPUT | |
| lua5.4 bin/engines.lua --check | |
| engine-consistency: | |
| name: Engine Consistency (${{ matrix.engine }}) | |
| runs-on: ubuntu-latest | |
| needs: discover-engines | |
| if: needs.discover-engines.outputs.engines != '[]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| engine: ${{ fromJson(needs.discover-engines.outputs.engines) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Lua | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lua5.4 | |
| - name: Run engine consistency tests for ${{ matrix.engine }} | |
| run: ALLOWED_ENGINES=${{ matrix.engine }} TEST_ONLY_SLUGS=engine_consistency_integration lua5.4 ./bin/test.lua |