Implement Borrow
for Key
#22
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 | |
tags: | |
- "*" | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
# make sure all code has been formatted with rustfmt | |
- name: check rustfmt | |
run: | | |
rustup component add rustfmt | |
cargo fmt -- --check --color always | |
# run clippy to verify we have no warnings | |
- run: cargo fetch | |
- name: cargo clippy | |
run: | | |
rustup component add clippy | |
cargo clippy --all-targets --all-features -- -D warnings | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo fetch | |
- name: cargo test build | |
run: cargo build --tests | |
- name: cargo test | |
run: cargo test | |
deny: | |
name: cargo-deny | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
publish-check: | |
name: Publish Check | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo fetch | |
- name: cargo publish check | |
run: cargo publish --dry-run -p toml-span | |
test_success: | |
runs-on: ubuntu-22.04 | |
needs: [lint,test,deny,publish-check] | |
steps: | |
- run: echo "All test jobs passed" |