Skip to content

Update rust Docker tag to v1.92.0 #685

Update rust Docker tag to v1.92.0

Update rust Docker tag to v1.92.0 #685

Workflow file for this run

name: Numtracker CI
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: Check formatting
# Use nightly for formatting to enable unstable formatting styles
# * group imports
# * import_granularity
run: cargo +nightly fmt -- --check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: |
cargo --version
cargo clippy --version
cargo clippy --all-targets --all-features -- --deny warnings
sqlx_offline:
name: Check prepared offline query data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install sqlx CLI
run: cargo install [email protected]
- name: Check Prepared Queries
run: |
touch numtracker.db
cargo sqlx migrate run
cargo sqlx prepare --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests and generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
files: lcov.info
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# Ensure that no files (most likely the Cargo.lock file) have changed
- name: Unstaged Changes
run: git diff --exit-code