mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00

* switch to dtolnay/toolchain * Add .dockerignore to avoid copying target/ into images * update corrosion
80 lines
2 KiB
YAML
80 lines
2 KiB
YAML
name: checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
|
|
jobs:
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
name: "Check & Clippy"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
id: toolchain
|
|
with:
|
|
# If this version is old enough to cause errors, or older than the
|
|
# TaskChampion MSRV, bump it to the MSRV of the currently-required
|
|
# TaskChampion package; if necessary, bump that version as well.
|
|
toolchain: "1.81.0" # MSRV
|
|
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: target
|
|
key: ${{ runner.os }}-cargo-build-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- uses: actions-rs/cargo@v1.0.3
|
|
with:
|
|
command: check
|
|
|
|
- run: rustup component add clippy
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features
|
|
name: "Clippy Results"
|
|
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
name: "Formatting"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
id: toolchain
|
|
with:
|
|
toolchain: "stable"
|
|
components: "rustfmt"
|
|
|
|
- uses: actions-rs/cargo@v1.0.3
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
cargo-metadata:
|
|
runs-on: ubuntu-latest
|
|
name: "Cargo Metadata"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
id: toolchain
|
|
with:
|
|
toolchain: "stable"
|
|
components: "rustfmt"
|
|
|
|
- name: "Check metadata"
|
|
run: ".github/workflows/metadata-check.sh"
|