-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.woodpecker.yml
127 lines (114 loc) · 3.06 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
variables:
- &cd_workdir "cd /usr/src/app"
- &rust_image "rustlang/rust:nightly-bookworm"
- &install_binstall "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"
steps:
prettier_check:
image: tmknom/prettier:3.2.5
commands:
- prettier -c .
when:
- event: pull_request
toml_fmt:
image: tamasfe/taplo:0.9.3
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_home
commands:
- rustup component add rustfmt
- cargo +nightly 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_shear:
image: *rust_image
commands:
- *install_binstall
- cargo binstall -y cargo-shear
- cargo shear
when:
- event: pull_request
cargo_clippy:
image: *rust_image
environment:
CARGO_HOME: .cargo_home
commands:
- apt-get update && apt-get upgrade -y && apt-get install -y pkg-config
- rustup component add clippy
- cargo clippy
when:
- event: pull_request
cargo_test:
image: *rust_image
environment:
CARGO_HOME: .cargo_home
commands:
- cargo test
when:
- event: pull_request
cargo_leptos_build:
image: *rust_image
environment:
CARGO_HOME: .cargo_home
commands:
- *install_binstall
- rustup target add wasm32-unknown-unknown
- wget -O- https://deb.nodesource.com/setup_20.x | bash
- apt-get install -y nodejs
- npm i -g corepack
- corepack enable
- pnpm install --frozen-lockfile
- cargo binstall -y cargo-leptos
- cargo leptos build
when:
- event: pull_request
# Commenting this for now, until we figure out how to do it.
# playwright_check:
# image: local/playwright
# commands:
# - *cd_workdir
# when:
# - event: pull_request
notify_on_failure:
image: alpine:3
commands:
- apk add curl
- "curl -d'Lemmy-UI-leptos build failed: ${CI_PIPELINE_URL}' 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
services:
database:
image: pgautoupgrade/pgautoupgrade:17-alpine
environment:
POSTGRES_USER: lemmy
POSTGRES_PASSWORD: password
POSTGRES_DB: lemmy
when:
- event: pull_request
lemmy:
image: dessalines/lemmy:0.19.9
environment:
LEMMY_CONFIG_LOCATION: /woodpecker/src/github.com/LemmyNet/lemmy-ui-leptos/end2end/lemmy.hjson
when:
- event: pull_request