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

There is no easy way to determine the MSRV for TaskChampion, other than somehow pulling the right version of the source and grepping for it. In practice, if we update the `taskchampion` dependency to one that has a higher MSRV, we'll get a build error and find this comment. And if we get an error building Taskwarrior due to an old MSRV (for example if something changes on `crates.io`) then we will also find this comment. This also removes some superfluous dependency versions from the root workspace. `src/taskchampion-cpp/Cargo.toml` specifies versions directly.
66 lines
1.6 KiB
YAML
66 lines
1.6 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
|
|
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: target
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
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.73.0" # MSRV
|
|
override: true
|
|
|
|
- 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: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
components: rustfmt
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1.0.3
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|