Merge pull request #208 from chaoz23/fix/issue-207-demo-path #479
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: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npm test | |
| - name: CLI catches a broken story (expects exit 1) | |
| run: "! node dist/cli.js examples/broken.ink" | |
| shell: bash | |
| - name: CLI catches a runtime error (expects exit 1) | |
| run: "! node dist/cli.js examples/manor.ink" | |
| shell: bash | |
| hosted-container: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate Compose configuration | |
| run: INKCHECK_HOST=check.example.org docker compose config --quiet | |
| - name: Build hosted checker image | |
| run: docker build --tag inkcheck-hosted:test . | |
| - name: Start hosted checker | |
| run: docker run --detach --name inkcheck-hosted --publish 127.0.0.1:8080:8080 inkcheck-hosted:test | |
| - name: Wait for health check | |
| run: | | |
| for attempt in $(seq 1 30); do | |
| if curl --fail --silent http://127.0.0.1:8080/healthz; then | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| docker logs inkcheck-hosted | |
| exit 1 | |
| - name: Show container logs | |
| if: always() | |
| run: docker logs inkcheck-hosted || true | |
| promotion-smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm run --silent evaluate-promotion -- benchmarks/promotion-manifest.json --ci --deterministic > /dev/null |