You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/.drone.yml

121 lines
2.9 KiB
YAML

kind: pipeline
name: default
steps:
- name: cargo check
# we need to use this experimental image because the normal rust-musl-builder doesnt
# allow building as root (and drone doesnt have an easy way to git clone as non-root)
# https://github.com/emk/rust-musl-builder/issues/96
image: ekidd/rust-musl-builder:experimental-stable
user: root
commands:
- cargo check --all
4 years ago
# just to disable this temporarily
when:
ref:
- refs/tags/*
- name: cargo clippy
image: ekidd/rust-musl-builder:experimental-stable
user: root
commands:
- cargo clippy
4 years ago
# just to disable this temporarily
when:
ref:
- refs/tags/*
- name: check documentation build
image: ekidd/rust-musl-builder:experimental-stable
user: root
commands:
- mdbook build docs/
- name: install diesel cli
image: ekidd/rust-musl-builder:experimental-stable
user: root
volumes:
- name: dieselcli
path: /dieselcli
commands:
- cargo install diesel_cli --no-default-features --features postgres
- mv /root/.cargo/bin/diesel /dieselcli/diesel
# just to disable this temporarily
when:
ref:
- refs/tags/*
4 years ago
- name: cargo test
image: ekidd/rust-musl-builder:experimental-stable
4 years ago
user: root
environment:
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
4 years ago
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
volumes:
- name: dieselcli
path: /dieselcli
commands:
- apt-get update
- apt-get -y install --no-install-recommends espeak postgresql-client
- /dieselcli/diesel migration run
- cargo test --workspace --no-fail-fast
4 years ago
# just to disable this temporarily
when:
ref:
- refs/tags/*
- name: cargo build
image: ekidd/rust-musl-builder:experimental-stable
user: root
volumes:
- name: dieselcli
path: /dieselcli
commands:
- cargo build
- name: run federation tests
image: node:15-buster-slim
user: root
4 years ago
commands:
- apt-get update
- apt-get -y install --no-install-recommends bash curl
- cd api_tests/
4 years ago
- sh prepare-drone-federation-test.sh
4 years ago
- yarn
- yarn api-test
- name: create docker tags
image: ekidd/rust-musl-builder:experimental-stable
user: root
commands:
4 years ago
- echo "$(git describe),latest" > .tags
when:
ref:
- refs/tags/*
4 years ago
- name: make release build and push to docker hub
image: plugins/docker
settings:
dockerfile: docker/prod/Dockerfile
4 years ago
#username: kevinbacon
#password: pa55word
repo: dessalines/lemmy
when:
ref:
- refs/tags/*
services:
- name: database
image: postgres:12-alpine
environment:
POSTGRES_USER: lemmy
POSTGRES_PASSWORD: password
detach: true
volumes:
- name: dieselcli
temp: {}