enha: allow custom env when local #3908
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
name: Tests in docs | |
on: | |
pull_request: | |
branches: | |
- '*' | |
paths: | |
- 'src/**' | |
- '.github/workflows/doc-test.yml' | |
- 'justfile' | |
workflow_dispatch: | |
push: # Rebuild cache policy | |
branches: | |
- 'main' | |
paths: | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
jobs: | |
doc_unit_tests: | |
name: Documentation Unit Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.79 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
id: cache-cargo | |
with: | |
prefix-key: ${{ runner.os }}-v3-cargo | |
shared-key: test | |
key: ${{ hashFiles('Cargo.lock', 'Cargo.toml') }} | |
cache-provider: "github" | |
cache-directories: "~/.cargo/bin/" | |
- name: Install protoc | |
run: sudo apt-get install -y protobuf-compiler | |
- name: Set up Just | |
uses: extractions/setup-just@v2 | |
- name: Test docs | |
run: just test-doc |