fix: keep planning and diagnostics portable #11
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: VS Code extension | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| paths: | |
| - Cargo.lock | |
| - Cargo.toml | |
| - crates/** | |
| - editors/vscode/** | |
| - examples/counter/** | |
| - schemas/** | |
| - LICENSES/** | |
| - scripts/check-licenses.py | |
| - .github/workflows/vscode-extension.yml | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: rustferry-vscode-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| checks: | |
| name: Extension checks (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 35 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: editors/vscode/package-lock.json | |
| - name: Install extension dependencies | |
| working-directory: editors/vscode | |
| run: npm ci | |
| - uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable | |
| if: runner.os == 'Linux' | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| if: runner.os == 'Linux' | |
| with: | |
| cache-bin: "false" | |
| - name: Build real CLI protocol fixture | |
| if: runner.os == 'Linux' | |
| run: cargo build --locked -p cargo-ferry | |
| - name: Extension and real CLI checks | |
| if: runner.os == 'Linux' | |
| working-directory: editors/vscode | |
| env: | |
| RUSTFERRY_TEST_CLI: ${{ github.workspace }}/target/debug/cargo-ferry | |
| run: npm run check | |
| - name: Extension Host smoke | |
| if: runner.os == 'Linux' | |
| working-directory: editors/vscode | |
| env: | |
| RUSTFERRY_TEST_CLI: ${{ github.workspace }}/target/debug/cargo-ferry | |
| RUSTFERRY_VSCODE_TEST_CACHE: ${{ runner.temp }}/rustferry-vscode-test-cache | |
| run: xvfb-run --auto-servernum npm run test:host | |
| - name: Extension performance measurements | |
| if: runner.os == 'Linux' | |
| working-directory: editors/vscode | |
| env: | |
| RUSTFERRY_TEST_CLI: ${{ github.workspace }}/target/debug/cargo-ferry | |
| run: npm run perf | |
| - name: Extension checks | |
| if: runner.os != 'Linux' | |
| working-directory: editors/vscode | |
| run: npm run check | |
| - name: Dependency license policy | |
| if: runner.os == 'Linux' | |
| run: python3 scripts/check-licenses.py | |
| - name: Upload verified VSIX | |
| if: runner.os == 'Linux' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: rustferry-vscode-${{ github.sha }} | |
| path: editors/vscode/dist/rustferry-vscode.vsix | |
| if-no-files-found: error | |
| retention-days: 14 |