mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [peaceiris/actions-mdbook](https://github.com/peaceiris/actions-mdbook) from 1 to 2. - [Release notes](https://github.com/peaceiris/actions-mdbook/releases) - [Changelog](https://github.com/peaceiris/actions-mdbook/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-mdbook/compare/v1...v2) --- updated-dependencies: - dependency-name: peaceiris/actions-mdbook dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
115 lines
2.7 KiB
YAML
115 lines
2.7 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:
|
|
toolchain: "1.70.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"
|
|
|
|
mdbook:
|
|
runs-on: ubuntu-latest
|
|
name: "Documentation"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup mdBook
|
|
uses: peaceiris/actions-mdbook@v2
|
|
with:
|
|
# if this changes, change it in .github/workflows/publish-docs.yml as well
|
|
mdbook-version: '0.4.10'
|
|
|
|
- run: mdbook test taskchampion/docs
|
|
- run: mdbook build taskchampion/docs
|
|
|
|
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
|
|
|
|
codegen:
|
|
runs-on: ubuntu-latest
|
|
name: "codegen"
|
|
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:
|
|
toolchain: "1.70.0" # MSRV
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1.0.3
|
|
with:
|
|
command: run
|
|
args: --package xtask -- codegen
|
|
|
|
- name: check for changes
|
|
run: |
|
|
if ! git diff; then
|
|
echo "Generated code not up-to-date;
|
|
run `cargo run --package xtask -- codegen` and commit the result";
|
|
exit 1;
|
|
fi
|