10 - name: fetch git submodules
11 image: node:15-alpine3.12
14 - git submodule update --init --recursive --remote
17 image: ekidd/rust-musl-builder:1.47.0
20 - chown 1000:1000 . -R
22 - name: check documentation build
23 image: ekidd/rust-musl-builder:1.47.0
25 - cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git --branch localization --rev d06249b
28 - name: check formatting
29 image: rustdocker/rust:nightly
31 - /root/.cargo/bin/cargo fmt -- --check
34 image: ekidd/rust-musl-builder:1.47.0
36 - cargo clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
39 image: ekidd/rust-musl-builder:1.47.0
41 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
46 - sudo apt-get -y install --no-install-recommends espeak postgresql-client
47 - cargo test --workspace --no-fail-fast
50 image: ekidd/rust-musl-builder:1.47.0
53 - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
55 - name: run federation tests
56 image: node:15-alpine3.12
58 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
59 DO_WRITE_HOSTS_FILE: 1
61 - apk add bash curl postgresql-client
62 - bash api_tests/prepare-drone-federation-test.sh
67 - name: make release build and push to docker hub
70 dockerfile: docker/prod/Dockerfile
72 from_secret: docker_username
74 from_secret: docker_password
75 repo: dessalines/lemmy
83 image: postgres:12-alpine
86 POSTGRES_PASSWORD: password
98 - name: fetch git submodules
99 image: node:15-alpine3.12
102 - git submodule update --init --recursive --remote
105 image: rust:1.47-slim-buster
107 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
112 - apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
113 - cargo test --workspace --no-fail-fast
116 # Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
118 image: rust:1.47-slim-buster
121 - apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
123 - mv target/debug/lemmy_server target/lemmy_server
125 - name: run federation tests
126 image: node:15-buster-slim
128 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
129 DO_WRITE_HOSTS_FILE: 1
131 - mkdir -p /usr/share/man/man1 /usr/share/man/man7
133 - apt-get -y install --no-install-recommends bash curl libssl-dev pkg-config libpq-dev postgresql-client libc6-dev
134 - bash api_tests/prepare-drone-federation-test.sh
139 - name: make release build and push to docker hub
140 image: plugins/docker
142 dockerfile: docker/prod/Dockerfile.arm
144 from_secret: docker_username
146 from_secret: docker_password
147 repo: dessalines/lemmy
149 auto_tag_suffix: arm64
156 image: postgres:12-alpine
159 POSTGRES_PASSWORD: password