mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
Engineering - Add GitHub action for pull requests (#254056)
* Test - handle running tests as part of a GitHub action * Add GitHub action files
This commit is contained in:
46
.github/workflows/pr-linux-cli-test.yml
vendored
Normal file
46
.github/workflows/pr-linux-cli-test.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
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 ]
|
||||
env:
|
||||
RUSTUP_TOOLCHAIN: ${{ inputs.rustup_toolchain }}
|
||||
steps:
|
||||
- name: Checkout microsoft/vscode
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- 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
|
||||
Reference in New Issue
Block a user