renovate
021b7ea8dd
This PR contains the following updates: | Package | Update | Change | |---|---|---| | docker.io/rust | minor | `1.77` -> `1.78` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMzQuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMzNC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: Renovate Bot <renovate@kemitix.net> Co-authored-by: kemitix <kemitix@noreply.kemitix.net> Reviewed-on: #13 Co-authored-by: renovate <renovate@noreply.kemitix.net> Co-committed-by: renovate <renovate@noreply.kemitix.net>
98 lines
2.4 KiB
YAML
98 lines
2.4 KiB
YAML
variables:
|
|
- &rust_image "docker.io/rust:1.78.0"
|
|
- &slow_check_paths
|
|
- path:
|
|
# rust source code
|
|
- "crates/**"
|
|
- "src/**"
|
|
- "tests/**"
|
|
- "**/Cargo.toml"
|
|
- "Cargo.lock"
|
|
# database migrations
|
|
- "migrations/**"
|
|
# config files and scripts used by ci
|
|
- ".woodpecker.yml"
|
|
|
|
steps:
|
|
|
|
toml_fmt:
|
|
image: docker.io/tamasfe/taplo:0.8.1
|
|
commands:
|
|
- taplo format --check
|
|
|
|
|
|
cargo_fmt:
|
|
image: docker.io/rustlang/rust:nightly
|
|
environment:
|
|
# store cargo data in repo folder so that it gets cached between steps
|
|
CARGO_HOME: .cargo_home
|
|
commands:
|
|
- rustup component add rustfmt
|
|
- cargo fmt --check
|
|
|
|
cargo_machete:
|
|
image: *rust_image
|
|
commands:
|
|
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
|
|
- tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
|
|
- rm cargo-binstall-x86_64-unknown-linux-musl.tgz
|
|
- mv cargo-binstall /usr/local/cargo/bin
|
|
- cargo binstall -y cargo-machete
|
|
- cargo machete
|
|
|
|
ignored_files:
|
|
image: docker.io/alpine:latest
|
|
commands:
|
|
- apk add git
|
|
- IGNORED=$(git ls-files --cached -i --exclude-standard)
|
|
- if [[ "$IGNORED" ]]; then echo "Ignored files present:\n$IGNORED\n"; exit 1; fi
|
|
|
|
check:
|
|
image: *rust_image
|
|
environment:
|
|
CARGO_HOME: .cargo_home
|
|
commands:
|
|
- cargo check
|
|
when: *slow_check_paths
|
|
|
|
cargo_clippy:
|
|
image: *rust_image
|
|
environment:
|
|
CARGO_HOME: .cargo_home
|
|
commands:
|
|
- rustup component add clippy
|
|
- cargo clippy --tests --all-targets -- -D warnings
|
|
when: *slow_check_paths
|
|
|
|
cargo_build:
|
|
image: *rust_image
|
|
environment:
|
|
CARGO_HOME: .cargo_home
|
|
commands:
|
|
- cargo build
|
|
- mv target/debug/skip target/skip
|
|
when: *slow_check_paths
|
|
|
|
cargo_test:
|
|
image: *rust_image
|
|
environment:
|
|
RUST_BACKTRACE: "1"
|
|
CARGO_HOME: .cargo_home
|
|
commands:
|
|
- cargo test --no-fail-fast
|
|
when: *slow_check_paths
|
|
|
|
integration_test:
|
|
image: *rust_image
|
|
commands:
|
|
- ./test.sh
|
|
when: *slow_check_paths
|
|
|
|
publish_to_crates_io:
|
|
image: *rust_image
|
|
commands:
|
|
- cargo login "$CARGO_REGISTRY_TOKEN"
|
|
- cargo publish --registry crates-io --no-verify
|
|
secrets: [cargo_registry_token]
|
|
when:
|
|
event: tag
|