Skip to content

deps: bump and format deps versions #40

deps: bump and format deps versions

deps: bump and format deps versions #40

Workflow file for this run

name: Rust
on:
push:
branches:
- main
pull_request: {}
env:
CARGO_TERM_COLOR: always
SQLX_VERSION: 0.7.1
SQLX_FEATURES: "rustls,postgres"
jobs:
check:
name: Check
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
key: sqlx-${{ env.SQLX_VERSION }}
- name: cargo install sqlx-cli
run: cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features
--locked
- name: run init_db.sh script
run: |
sudo apt-get install libpq-dev -y
SKIP_DOCKER=true ./scripts/init_db.sh
- name: cargo sqlx prepare check
run: |
cargo sqlx prepare --workspace --check -- --all-targets
- name: cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: cargo fmt
run: cargo fmt --all --check
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: sqlx-${{ env.SQLX_VERSION }}
- name: cargo install sqlx-cli
run: cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features
--locked
- name: run init_db.sh script
run: |
sudo apt-get install libpq-dev -y
SKIP_DOCKER=true ./scripts/init_db.sh
- name: cargo sqlx prepare check
run: |
cargo sqlx prepare --workspace --check -- --all-targets
- name: cargo test
run: cargo test