From 38a76b4b2ff9e0b20a7621054ee1e115c91a129f Mon Sep 17 00:00:00 2001 From: Justin Garcia Date: Sat, 12 Sep 2026 06:09:15 +0000 Subject: [PATCH] Test against latest Iris canary Amp-Thread-ID: https://ampcode.com/threads/T-01a093ea-0f35-701b-a273-3488e1eea068 Co-authored-by: Amp --- .github/workflows/checks.yml | 54 +++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b7d3c28..7ea5a1e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -53,7 +53,7 @@ jobs: run: npm run test:unit integration: - name: Integration tests (${{ matrix.platform }}, VS Code ${{ matrix.version_label }}) + name: Integration tests (${{ matrix.platform }}, VS Code ${{ matrix.version_label }}, Iris ${{ matrix.iris_channel }}) runs-on: ${{ matrix.os }} needs: node @@ -65,24 +65,35 @@ jobs: os: ubuntu-24.04 version_label: minimum vscode_version: ${{ needs.node.outputs.vscode_version }} + iris_channel: stable iris-executable: iris test-command: xvfb-run -a npm run test:integration - platform: macOS os: macos-14 version_label: minimum vscode_version: ${{ needs.node.outputs.vscode_version }} + iris_channel: stable iris-executable: iris test-command: npm run test:integration - platform: Windows os: windows-2022 version_label: minimum vscode_version: ${{ needs.node.outputs.vscode_version }} + iris_channel: stable iris-executable: iris.exe test-command: npm run test:integration - platform: Linux os: ubuntu-24.04 version_label: stable vscode_version: stable + iris_channel: stable + iris-executable: iris + test-command: xvfb-run -a npm run test:integration + - platform: Linux + os: ubuntu-24.04 + version_label: stable + vscode_version: stable + iris_channel: canary iris-executable: iris test-command: xvfb-run -a npm run test:integration @@ -103,6 +114,35 @@ jobs: - name: Install dependencies run: npm ci + - name: Resolve newest Iris canary + if: matrix.iris_channel == 'canary' + shell: bash + run: | + iris_version="$({ + gh api --paginate \ + -H 'Accept: application/vnd.github+json' \ + -H 'X-GitHub-Api-Version: 2022-11-28' \ + 'repos/purefunctor/purescript-iris/releases?per_page=100' + } | jq -sr ' + add + | map(select( + .draft == false + and .prerelease == true + and (.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-dev\\.[0-9a-f]{12}$")) + )) + | sort_by(.published_at) + | last + | .tag_name // empty + ')" + + if [[ -z "$iris_version" ]]; then + echo 'No published non-draft Iris canary release matched v-dev.<12-hex-commit>.' >&2 + exit 1 + fi + + echo "Using Iris canary $iris_version" + echo "IRIS_VERSION=$iris_version" >> "$GITHUB_ENV" + - name: Install Iris if: runner.os != 'Windows' env: @@ -121,6 +161,18 @@ jobs: irm https://raw.githubusercontent.com/purefunctor/purescript-iris/main/install.ps1 | iex + - name: Verify Iris canary version + if: matrix.iris_channel == 'canary' + shell: bash + run: | + installed_version="$($RUNNER_TEMP/iris/bin/iris --version)" + expected_version="iris ${IRIS_VERSION#v}" + echo "Installed $installed_version" + if [[ "$installed_version" != "$expected_version" ]]; then + echo "Expected $expected_version, but installed $installed_version." >&2 + exit 1 + fi + - name: Cache minimum VS Code if: matrix.version_label == 'minimum' uses: actions/cache@v5