Skip to content

Improve installer: auto-update PATH like uv #24

Improve installer: auto-update PATH like uv

Improve installer: auto-update PATH like uv #24

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# Code quality checks
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ubuntu-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
ubuntu-cargo-lint-
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
# Unit tests for all crates
test:
name: Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: macos-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
macos-cargo-test-
- name: Check Swift version
run: swift --version
- name: Run all tests
run: cargo test --all-features --workspace
- name: Build release
run: cargo build --release
- name: CLI smoke test
run: |
./target/release/gust --version
./target/release/gust --help
# Integration tests with real Swift toolchain
integration:
name: Integration Test
runs-on: macos-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: macos-cargo-integration-${{ hashFiles('**/Cargo.lock') }}
- name: Build release
run: cargo build --release
- name: Test package creation
run: |
cd /tmp
$GITHUB_WORKSPACE/target/release/gust new testpkg --type exe
cd testpkg
cat Gust.toml
- name: Test dependency management
run: |
cd /tmp/testpkg
$GITHUB_WORKSPACE/target/release/gust add swift-log --git https://github.com/apple/swift-log.git --tag 1.5.0
$GITHUB_WORKSPACE/target/release/gust install
$GITHUB_WORKSPACE/target/release/gust outdated
$GITHUB_WORKSPACE/target/release/gust tree