Repository navigation
Release: 0.31.0 #47
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: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| # Cancel queued/in-progress runs for the same ref when a new push lands, | |
| # so rapid-fire commits to a feature branch do not pile up identical CI. | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # The webview Vite bundle is required for the plugin to build | |
| # cleanly; tests themselves don't load it, but keeping the | |
| # submodule checkout consistent with publish_plugin.yaml | |
| # avoids divergent CI surprises. | |
| submodules: recursive | |
| - name: Prepare java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: 17 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Babashka | |
| uses: DeLaGuardo/setup-clojure@master | |
| with: | |
| bb: '1.12.196' | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| # processResources follows src/main/resources/webview/dist (a | |
| # symlink into eca-webview/dist) even when only the test task is | |
| # invoked, because the IntelliJ Gradle plugin wires `classes` | |
| # into the test graph. On fresh checkouts the dist symlink target | |
| # does not exist, so create an empty placeholder; the test suite | |
| # does not consume any bundled webview asset. | |
| - name: Stub webview dist | |
| run: mkdir -p eca-webview/dist | |
| - name: Run tests | |
| run: bb test |