Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
name: Cargo Build & Test

on:
push:
branches:
push:
branches:
- master
pull_request:
branches:
- master

env:
env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: cls project - latest
# Formatting + clippy run once on stable; rustfmt/clippy output is toolchain-specific, so it is
# not gated on the MSRV toolchain.
lint:
name: Lint (fmt + clippy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: cargo fmt -- --check
- run: cargo clippy --locked --workspace --all-targets -- -D warnings

# The extension ships linux + mac binaries (see client.ts bundledBinaryPath). Windows is not a
# supported target — Windows users run the server under WSL — so the test matrix covers linux +
# mac only.
test:
name: Test (stable) / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain:
- stable
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: cargo build --locked --verbose
- run: cargo test --locked --verbose

# MSRV: build + test on the declared minimum Rust (workspace `rust-version`). Deterministic
# because Cargo.lock is committed; `--locked` refuses to drift above it. No fmt/clippy here —
# those are toolchain-specific and gated in the `lint` job.
msrv:
name: MSRV (1.71)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo clippy
- run: cargo fmt -- --check
- run: cargo build --verbose
- run: cargo test --verbose

- uses: actions/checkout@v4
- run: rustup update 1.71.0 && rustup default 1.71.0
- run: cargo build --locked --verbose
- run: cargo test --locked --verbose
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ out
node_modules
.vscode-test
/target
Cargo.lock
assets
*.new
*.pending-snap
Expand Down
Loading
Loading