/
.woodpecker.yml
103 lines (93 loc) · 2.63 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
variables:
- &rust_image "rustlang/rust:nightly"
- &install_binstall "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 && cp cargo-binstall /usr/local/cargo/bin"
steps:
prettier_check:
image: tmknom/prettier:3.0.0
commands:
- prettier -c .
when:
- event: pull_request
toml_fmt:
image: tamasfe/taplo:0.8.1
commands:
- taplo format --check
when:
- event: pull_request
cargo_fmt:
image: *rust_image
environment:
# store cargo data in repo folder so that it gets cached between steps
CARGO_HOME: .cargo
commands:
- cargo fmt -- --check
when:
- event: pull_request
leptos_fmt:
image: *rust_image
commands:
- *install_binstall
- cargo binstall -y leptosfmt
- leptosfmt -c .leptosfmt.toml --check src
when:
- event: pull_request
cargo_machete:
image: *rust_image
commands:
- *install_binstall
- cargo binstall -y cargo-machete
- cargo machete
when:
- event: pull_request
cargo_clippy:
image: *rust_image
environment:
CARGO_HOME: .cargo
commands:
- apt-get update && apt-get -y install libssl-dev pkg-config
- rustup component add clippy
- cargo clippy
when:
- event: pull_request
cargo_build:
image: *rust_image
environment:
CARGO_HOME: .cargo
commands:
- *install_binstall
- cargo-binstall -y cargo-leptos
- apt-get update && apt-get -y install libssl-dev pkg-config
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- . /root/.profile
- nvm install --lts
- npm install -g pnpm
- pnpm install
- rustup target add wasm32-unknown-unknown
- cargo leptos build
when:
- event: pull_request
# Nothing to test yet
# cargo_test:
# image: *rust_image
# environment:
# CARGO_HOME: .cargo
# commands:
# - apt-get update && apt-get -y install libssl-dev pkg-config
# - rustup target add wasm32-unknown-unknown
# - cargo install cargo-leptos
# - cargo leptos test
notify_on_failure:
image: alpine:3
commands:
- apk add curl
- "curl -d'Lemmy-UI-leptos build failed: ${CI_BUILD_LINK}' ntfy.sh/lemmy_drone_ci"
when:
- event: pull_request
status: failure
notify_on_tag_deploy:
image: alpine:3
commands:
- apk add curl
- "curl -d'Lemmy-UI-leptos:${CI_COMMIT_TAG} deployed' ntfy.sh/lemmy_drone_ci"
when:
event: tag