-
Notifications
You must be signed in to change notification settings - Fork 2
/
.woodpecker.yml
81 lines (72 loc) · 2 KB
/
.woodpecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
variables:
- &rust_image "rust:1.83-slim-bookworm"
steps:
toml_fmt:
image: tamasfe/taplo:0.9.3
commands:
- taplo format --check
when:
- event: pull_request
depends_on: [] # enable parallel steps
cargo_fmt:
image: rustlang/rust:nightly-alpine
commands:
- rustup component add rustfmt
- cargo +nightly fmt -- --check
when:
- event: pull_request
cargo_machete:
image: *rust_image
commands:
- apt update && apt -y install wget
- wget -O- https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xvz -C /usr/local/cargo/bin
- cargo binstall -y cargo-machete
- cargo machete
when:
- event: pull_request
cargo_clippy:
image: *rust_image
commands:
- apt update && apt install pkg-config libssl-dev -y
- rustup component add clippy
- cargo clippy --tests --all-targets -- -D warnings
when:
- event: pull_request
cargo_build:
image: *rust_image
commands:
- apt update && apt install pkg-config libssl-dev -y
- cargo build
when:
- event: pull_request
cargo_test:
image: *rust_image
environment:
RUST_BACKTRACE: "1"
commands:
- apt update && apt install pkg-config libssl-dev -y
- cargo test --no-fail-fast
when:
- event: pull_request
publish_to_crates_io:
image: *rust_image
commands:
- cargo publish --allow-dirty --no-verify --token "$CARGO_API_TOKEN"
secrets: [cargo_api_token]
when:
- event: tag
notify_on_failure:
image: alpine:3
commands:
- apk add curl
- "curl -d'lemmy-client-rs CI build failed: ${CI_PIPELINE_URL}' ntfy.sh/lemmy_drone_ci"
when:
- event: [pull_request, tag]
status: failure
notify_on_tag_deploy:
image: alpine:3
commands:
- apk add curl
- "curl -d'lemmy-client-rs:${CI_COMMIT_TAG} deployed' ntfy.sh/lemmy_drone_ci"
when:
- event: tag