Bump version and update changelog #492
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: Rust Lint | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'rust/**' | |
- '.github/workflows/rust-lint.yml' | |
pull_request: | |
paths: | |
- 'rust/**' | |
- '.github/workflows/rust-lint.yml' | |
- "openapi.json" | |
# When pushing to a PR, cancel any jobs still running for the previous head commit of the PR | |
concurrency: | |
# head_ref is only defined for pull requests, run_id is always unique and defined so if this | |
# workflow was not triggered by a pull request, nothing gets cancelled. | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test-versions: | |
name: Rust Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Regen openapi libs | |
run: | | |
yarn | |
./regen_openapi.sh | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "rust -> target" | |
# only save the cache on the main branch | |
# cf https://github.com/Swatinem/rust-cache/issues/95 | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
# include relevant information in the cache name | |
prefix-key: "rust-client-${{ matrix.rust }}" | |
- name: Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
working-directory: rust | |
- name: rustfmt | |
run: cargo fmt -- --check | |
working-directory: rust | |
- name: Run tests | |
run: cargo test --all | |
working-directory: rust |