Remove 30 day staleness limit restriction for integration scanning #529
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: static analysis | |
on: pull_request | |
# Run checkers independently, so you see errors from each. | |
jobs: | |
# Linting | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features -- -D warnings | |
# Formatting | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt | |
- run: cargo fmt | |
- run: git diff --exit-code | |
# Ensure db is migrated | |
db-migrated: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: sqlx-cli | |
- run: '! make migration-status | grep -q pending' | |
# Ensure all deps are used | |
unused-deps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-machete | |
# If you're here because CI is flagging a dependency as unused, | |
# but it really is used, you can add an exception! | |
# | |
# https://github.com/bnjbvr/cargo-machete#false-positives | |
# | |
# If it is unused, you can fix it by installing and running machete: | |
# | |
# cargo binstall cargo-machete | |
# cargo machete --fix | |
- run: cargo machete |