lemmy/.drone.yml

63 lines
1.9 KiB
YAML
Raw Normal View History

2020-12-08 20:13:53 +00:00
kind: pipeline
name: default
steps:
2020-12-09 22:58:50 +00:00
- name: cargo test
image: ekidd/rust-musl-builder:1.47.0
environment:
2020-12-09 23:00:43 +00:00
LEMMY_DATABASE_URL: postgres://lemmy:password@localhost:5432/lemmy
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
2020-12-08 20:13:53 +00:00
commands:
2020-12-09 23:13:21 +00:00
- ls -la
2020-12-09 22:58:50 +00:00
- cargo check --all
- cargo test --workspace --no-fail-fast
2020-12-09 21:43:32 +00:00
- name: run federation tests
image: docker/compose:alpine-1.27.4
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- cd docker/travis/
- mkdir -p volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
- chown -R 991:991 volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
- docker-compose up -d
- pushd ../../api_tests
- echo "Waiting for Lemmy to start..."
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done
- yarn
- yarn api-test
- popd
2020-12-08 20:25:24 +00:00
- docker-compose down
2020-12-08 20:13:53 +00:00
2020-12-09 22:17:32 +00:00
- name: make release build and push to docker hub
2020-12-09 22:58:50 +00:00
image: plugins/docker
settings:
dockerfile: docker/prod/Dockerfile
username: kevinbacon
password: pa55word
repo: dessalines/lemmy
tags:
- latest
2020-12-09 22:17:32 +00:00
when:
ref:
- refs/heads/feature-*
- refs/tags/*
2020-12-09 21:43:32 +00:00
2020-12-09 22:58:50 +00:00
services:
- name: postgres
image: postgres:12-alpine
environment:
2020-12-09 23:00:43 +00:00
POSTGRES_USER: lemmy
POSTGRES_PASSWORD: password
2020-12-09 22:58:50 +00:00
2020-12-09 13:56:45 +00:00
volumes:
- name: docker_sock
host:
2020-12-09 21:43:32 +00:00
path: /var/run/docker.sock