pgmq-rs: add parameter names and explicit types in all fn calls #518
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: pgmq-rs client crate CI workflow | |
defaults: | |
run: | |
shell: bash | |
working-directory: pgmq-rs/ | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/crate_ci.yml" | |
- "pgmq-rs/**" | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install minimal nightly with clippy and rustfmt | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo format | |
run: cargo +nightly fmt --all --check | |
- name: Clippy | |
run: cargo clippy | |
tests: | |
name: Run tests | |
runs-on: ubuntu-22.04 | |
needs: lint | |
env: | |
DATABASE_URL: "postgresql://postgres:postgres@0.0.0.0:5432/postgres" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: install dependencies | |
run: cargo install sqlx-cli | |
- name: run all tests | |
run: make test | |
- name: Migrations | |
# ensure migration cache is up to date | |
run: cargo sqlx prepare --check | |
- name: teardown | |
run: make test.cleanup |