Files
vscode/.github/workflows/pr-linux-cli-test.yml
Michael Lively 7a833e177b ci: switch PR workflows back to 1ES self-hosted runners with JobId (#313128)
* ci: switch PR workflows back to 1ES self-hosted runners with JobId

Re-applies #311975 (reverted in #312033). Adds per-run+attempt JobId
labels to scope 1ES agents to specific GitHub Actions runs and prevent
intermittent runner cancellations.

Also switches the pr.yml compile job's GITHUB_TOKEN from the
ephemeral repo-scoped runner token to secrets.VSCODE_OSS so cross-repo
GitHub API release fetches (vscode-js-debug, vscode-js-debug-companion,
vscode-js-profile-visualizer, etc.) authenticate properly. On 1ES pools
the shared egress IPs hit the anonymous 60/hr api.github.com rate limit
and produced 403 fan-out across PRs last time.

* ci: fall back to GITHUB_TOKEN for fork PRs

Match the historical pattern from before #255987 — fork PRs can't
access secrets.VSCODE_OSS, so use the conditional to pick GITHUB_TOKEN
for forks.
2026-04-29 10:51:12 -07:00

49 lines
1.3 KiB
YAML

on:
workflow_call:
inputs:
job_name:
type: string
required: true
rustup_toolchain:
type: string
required: true
jobs:
linux-cli-test:
name: ${{ inputs.job_name }}
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=linux-cli-test-${{ inputs.job_name }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
env:
RUSTUP_TOOLCHAIN: ${{ inputs.rustup_toolchain }}
steps:
- name: Checkout microsoft/vscode
uses: actions/checkout@v6
with:
lfs: true
- name: Install Rust
run: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain $RUSTUP_TOOLCHAIN
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Set Rust version
run: |
set -e
rustup default $RUSTUP_TOOLCHAIN
rustup update $RUSTUP_TOOLCHAIN
rustup component add clippy
- name: Check Rust versions
run: |
set -e
rustc --version
cargo --version
- name: Clippy lint
run: cargo clippy -- -D warnings
working-directory: cli
- name: 🧪 Run unit tests
run: cargo test
working-directory: cli