Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding woodpecker #90

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions .drone.yml → .woodpecker.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,46 @@
---
kind: pipeline
name: amd64

platform:
os: linux
arch: amd64

steps:

- name: prepare repo
pipeline:
prepare_repo:
image: rustdocker/rust:nightly
commands:
- git submodule init
- git submodule update

- name: check css/js formatting
check_css_js_formatting:
image: node:alpine
commands:
- npm install --save-dev --save-exact prettier
- ./node_modules/prettier/bin-prettier.js --check assets

- name: check rust formatting
check_rust_formatting:
image: rustdocker/rust:nightly
commands:
- /root/.cargo/bin/cargo fmt -- --check

- name: cargo check
cargo_check:
image: rust:1.68-buster
environment:
CARGO_HOME: .cargo
commands:
- cargo check
- cargo check --features embed-lemmy

- name: cargo clippy
cargo_clippy:
image: rust:1.68-buster
environment:
CARGO_HOME: .cargo
commands:
- rustup component add clippy
- cargo clippy --workspace --tests --all-targets -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro

- name: cargo test
cargo_test:
image: rust:1.68-buster
environment:
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
CARGO_HOME: .cargo
commands:
- cargo test --workspace --no-fail-fast

- name: nightly build
nightly_build:
image: plugins/docker
settings:
dockerfile: docker/Dockerfile
Expand All @@ -64,7 +55,7 @@ steps:
event:
- cron

- name: publish release docker image
publish_release_docker_image:
image: plugins/docker
settings:
dockerfile: docker/Dockerfile
Expand All @@ -75,11 +66,10 @@ steps:
repo: lemmynet/lemmybb
auto_tag: true
when:
ref:
- refs/tags/*
event: tag

services:
- name: database
database:
image: postgres:15-alpine
environment:
POSTGRES_USER: lemmy
Expand Down