chore(cargo): Bump tracing-actix-web from 0.7.14 to 0.7.15 #381
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: lint | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- '**/src/**/*' | |
- '**/tests/**/*' | |
- 'Cargo.toml' | |
- '**/Cargo.toml' | |
- 'Cargo.lock' | |
- '**/Cargo.lock' | |
- '.rustfmt.toml' | |
- 'docker-compose.yml' | |
- '.github/workflows/lint.yml' | |
env: | |
CARGO_TERM_COLOR: always | |
SQLX_VERSION: "0.8.2" | |
SQLX_FEATURES: "rustls,mysql" | |
DATABASE_URL: "mysql://root:password@127.0.0.1:3306/lrzcc" | |
jobs: | |
fmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Enforce formatting | |
run: cargo fmt --check | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: getong/mariadb-action@v1.11 | |
with: | |
mysql database: 'lrzcc' | |
mysql root password: 'password' | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install the Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Rust Cache Action | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: sqlx-${{ env.SQLX_VERSION }} | |
- name: Install sqlx-cli | |
run: | |
cargo install sqlx-cli | |
--version=${{ env.SQLX_VERSION }} | |
--features ${{ env.SQLX_FEATURES }} | |
--no-default-features | |
--locked | |
- name: Install mariadb-client and mold | |
run: sudo apt update && sudo apt install mariadb-client mold -y | |
- name: Migrate database | |
run: SKIP_DOCKER=true ./scripts/init_db.sh | |
- name: Check sqlx offline data is up to date | |
run: cargo sqlx prepare --workspace --check | |
- name: Run tests | |
run: cargo clippy -- -D warnings | |
spellcheck: | |
name: spellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install the Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install libclang-dev and hunspell | |
run: sudo apt update && sudo apt install libclang-dev hunspell -y | |
- name: Install cargo-spellcheck | |
run: cargo install cargo-spellcheck | |
- name: Check spelling | |
run: cargo spellcheck --cfg=.spellcheck.toml --code 1 | |
machete: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Machete | |
uses: bnjbvr/cargo-machete@main |