Persistent KCL sessions #1298
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.rs' | |
- '**.rs.gen' | |
- Cargo.toml | |
- Cargo.lock | |
- .github/workflows/cargo-test.yml | |
- 'rust-toolchain.toml' | |
- 'Makefile' | |
- 'spec.json' | |
pull_request: | |
paths: | |
- '**.rs' | |
- '**.rs.gen' | |
- Cargo.toml | |
- Cargo.lock | |
- .github/workflows/cargo-test.yml | |
- 'rust-toolchain.toml' | |
- 'Makefile' | |
- 'spec.json' | |
workflow_dispatch: | |
permissions: read-all | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
name: cargo test | |
jobs: | |
cargotest: | |
name: cargo test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install latest rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
override: true | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache cargo index | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/git | |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache cargo build | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: taiki-e/install-action@nextest | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Run cargo test | |
run: | | |
cargo nextest run --workspace | |
env: | |
ZOO_TEST_TOKEN: ${{secrets.KITTYCAD_TOKEN}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
RUST_BACKTRACE: 1 | |
- name: Test with coverage | |
run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --no-fail-fast | |
env: | |
ZOO_TEST_TOKEN: ${{secrets.KITTYCAD_TOKEN}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
RUST_BACKTRACE: 1 | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
fail_ci_if_error: true | |
flags: unittests | |
files: lcov.info | |
verbose: true |