12 image: ekidd/rust-musl-builder:1.50.0
15 - chown 1000:1000 . -R
17 - name: check formatting
18 image: rustdocker/rust:nightly
20 - /root/.cargo/bin/cargo fmt -- --check
23 image: ekidd/rust-musl-builder:1.50.0
25 - cargo clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
26 - cargo clippy --workspace -- -D clippy::unwrap_used
29 image: ekidd/rust-musl-builder:1.50.0
31 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
36 - sudo apt-get -y install --no-install-recommends espeak postgresql-client
37 - cargo test --workspace --no-fail-fast
40 image: ekidd/rust-musl-builder:1.50.0
43 - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
45 - name: run federation tests
46 image: node:15-alpine3.12
48 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
49 DO_WRITE_HOSTS_FILE: 1
51 - apk add bash curl postgresql-client
52 - bash api_tests/prepare-drone-federation-test.sh
57 - name: make release build and push to docker hub
60 dockerfile: docker/prod/Dockerfile
62 from_secret: docker_username
64 from_secret: docker_password
65 repo: dessalines/lemmy
67 auto_tag_suffix: linux-amd64
72 - name: push to docker manifest
73 image: plugins/manifest
76 from_secret: docker_username
78 from_secret: docker_password
79 target: "dessalines/lemmy:${DRONE_TAG}"
80 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
91 image: postgres:12-alpine
94 POSTGRES_PASSWORD: password
107 image: rust:1.50-slim-buster
109 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
114 - apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
115 - cargo test --workspace --no-fail-fast
118 # Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
120 image: rust:1.50-slim-buster
123 - apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
125 - mv target/debug/lemmy_server target/lemmy_server
127 - name: run federation tests
128 image: node:15-buster-slim
130 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
131 DO_WRITE_HOSTS_FILE: 1
133 - mkdir -p /usr/share/man/man1 /usr/share/man/man7
135 - apt-get -y install --no-install-recommends bash curl libssl-dev pkg-config libpq-dev postgresql-client libc6-dev
136 - bash api_tests/prepare-drone-federation-test.sh
141 - name: make release build and push to docker hub
142 image: plugins/docker
144 dockerfile: docker/prod/Dockerfile.arm
146 from_secret: docker_username
148 from_secret: docker_password
149 repo: dessalines/lemmy
151 auto_tag_suffix: linux-arm64
156 - name: push to docker manifest
157 image: plugins/manifest
160 from_secret: docker_username
162 from_secret: docker_password
163 target: "dessalines/lemmy:${DRONE_TAG}"
164 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
175 image: postgres:12-alpine
178 POSTGRES_PASSWORD: password