Merge pull request #757 from wado-lang/claude/panic-return-type-test-… #2170
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] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| integrity: | |
| name: Integrity | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| - uses: jdx/mise-action@v3 | |
| with: | |
| cache: true | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| MISE_VERBOSE: ${{ runner.debug }} | |
| - run: mise run clippy-fix | |
| - run: mise run update-bundled | |
| - run: cargo build --bin wado --bin wado-dev-tools | |
| - run: mise run update-golden-fixtures | |
| - run: mise run update-golden-format-fixtures | |
| - run: mise run doc-stdlib | |
| - run: mise run format | |
| - name: Check working tree is clean | |
| id: diff | |
| run: | | |
| git add -A | |
| if git diff --cached --exit-code; then | |
| echo "clean=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "clean=false" >> $GITHUB_OUTPUT | |
| echo "::error::Working tree is dirty. Run 'mise run on-task-done' locally and commit the changes." | |
| git diff --cached --stat | |
| exit 1 | |
| fi | |
| - name: Comment on PR with diff | |
| if: failure() && github.event_name == 'pull_request' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| MARKER="<!-- integrity-check-comment -->" | |
| DIFF_STAT=$(git diff --cached --stat) | |
| BODY="${MARKER} | |
| ## Working tree is dirty | |
| Integrity checks produced the following changes: | |
| \`\`\` | |
| ${DIFF_STAT} | |
| \`\`\` | |
| Please run \`mise run on-task-done\` locally and commit the changes." | |
| # Find existing comment with marker | |
| COMMENT_ID=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ | |
| --jq ".[] | select(.body | startswith(\"${MARKER}\")) | .id" | head -1) | |
| if [ -n "$COMMENT_ID" ]; then | |
| gh api repos/${{ github.repository }}/issues/comments/${COMMENT_ID} -X PATCH -f body="$BODY" | |
| else | |
| gh pr comment ${{ github.event.pull_request.number }} --body "$BODY" | |
| fi | |
| test-core: | |
| name: Test (Core) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| save-if: false | |
| - uses: rui314/setup-mold@v1 | |
| - run: cargo test --locked --all -- --skip fixture_test_ | |
| test-e2e-o0: | |
| name: Test (E2E O0) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| save-if: false | |
| - uses: rui314/setup-mold@v1 | |
| - run: cargo test --locked -p wado-compiler --test e2e -- fixture_test_o0 | |
| test-e2e-o1: | |
| name: Test (E2E O1) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| save-if: false | |
| - uses: rui314/setup-mold@v1 | |
| - run: cargo test --locked -p wado-compiler --test e2e -- fixture_test_o1 | |
| test-e2e-o3: | |
| name: Test (E2E O3) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| save-if: false | |
| - uses: rui314/setup-mold@v1 | |
| - run: cargo test --locked -p wado-compiler --test e2e -- fixture_test_o3 | |
| test-e2e-os: | |
| name: Test (E2E Os) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| save-if: false | |
| - uses: rui314/setup-mold@v1 | |
| - run: cargo test --locked -p wado-compiler --test e2e -- fixture_test_os | |
| test-wado: | |
| name: Test (Wado) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ci | |
| save-if: false | |
| - uses: rui314/setup-mold@v1 | |
| - uses: jdx/mise-action@v3 | |
| with: | |
| cache: true | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| MISE_VERBOSE: ${{ runner.debug }} | |
| - run: mise run test-wado | |
| check-wasm32: | |
| name: Check (wasm32) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: cargo check --locked -p wado-compiler --target wasm32-unknown-unknown | |
| test: | |
| name: Test | |
| if: always() | |
| needs: [test-core, test-wado, test-e2e-o0, test-e2e-o1, test-e2e-o3, test-e2e-os, check-wasm32] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check all jobs passed | |
| run: | | |
| results="${{ needs.test-core.result }} ${{ needs.test-wado.result }} ${{ needs.test-e2e-o0.result }} ${{ needs.test-e2e-o1.result }} ${{ needs.test-e2e-o3.result }} ${{ needs.test-e2e-os.result }} ${{ needs.check-wasm32.result }}" | |
| for result in $results; do | |
| if [ "$result" != "success" ]; then | |
| echo "One or more jobs failed" | |
| exit 1 | |
| fi | |
| done | |
| echo "All CI checks passed" |