Trying to fix drone 12

This commit is contained in:
Dessalines 2021-11-09 12:05:11 -05:00
parent 98d8bac724
commit 2a4f70d2fb

View file

@ -9,11 +9,10 @@ platform:
steps: steps:
- name: prepare repo - name: prepare repo
image: rust:1.56-alpine image: clux/muslrust:1.56.0
user: root user: root
commands: commands:
- chown 1000:1000 . -R - chown 1000:1000 . -R
- apk add git
- git fetch --tags - git fetch --tags
- name: check formatting - name: check formatting
@ -21,36 +20,33 @@ steps:
commands: commands:
- /root/.cargo/bin/cargo fmt -- --check - /root/.cargo/bin/cargo fmt -- --check
# - name: cargo clippy - name: cargo clippy
# image: rust:1.56-alpine image: clux/muslrust:1.56.0
# commands: commands:
# - rustup component add clippy - cargo clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
# - apk add musl-dev openssl-dev postgresql-dev libpq - cargo clippy --workspace -- -D clippy::unwrap_used
# - cargo clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
# - cargo clippy --workspace -- -D clippy::unwrap_used
- name: cargo test - name: cargo test
image: rust:1.56-alpine image: clux/muslrust:1.56.0
environment: environment:
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
LEMMY_CONFIG_LOCATION: ../../config/config.hjson LEMMY_CONFIG_LOCATION: ../../config/config.hjson
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1 RUST_TEST_THREADS: 1
commands: commands:
- apk add musl-dev openssl-dev postgresql-dev libpq postgresql-client - sudo apt-get update
- sudo apt-get -y install --no-install-recommends postgresql-client
- cargo test --workspace --no-fail-fast - cargo test --workspace --no-fail-fast
- name: check defaults.hjson updated - name: check defaults.hjson updated
image: rust:1.56-alpine image: clux/muslrust:1.56.0
commands: commands:
- apk add musl-dev openssl-dev postgresql-dev libpq diffutils sed
- ./scripts/update_config_defaults.sh config/defaults_current.hjson - ./scripts/update_config_defaults.sh config/defaults_current.hjson
- diff config/defaults.hjson config/defaults_current.hjson - diff config/defaults.hjson config/defaults_current.hjson
- name: cargo build - name: cargo build
image: rust:1.56-alpine image: clux/muslrust:1.56.0
commands: commands:
- apk add musl-dev openssl-dev postgresql-dev libpq
- cargo build - cargo build
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server