dev: Use cargo-make for common tasks #8
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: pull_request | |
on: | |
pull_request: | |
merge_group: | |
types: | |
- checks_requested | |
push: | |
branches: | |
- main | |
env: | |
SQLX_OFFLINE: true | |
jobs: | |
format: | |
name: format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- run: cargo fmt --all --check | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --workspace --all-targets | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
# Run tests with `gc_tombstone` on so that object IDs don't get reused in | |
# snapshot test output. | |
- run: cargo test --workspace --no-fail-fast --features='gc_tombstone' |