51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
when:
|
|
event:
|
|
- push
|
|
|
|
services:
|
|
- name: postgres
|
|
image: postgres:18
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: steep
|
|
|
|
steps:
|
|
- name: fmt
|
|
image: rust:1.99
|
|
commands:
|
|
- rustup component add rustfmt
|
|
- cargo fmt --all -- --check
|
|
|
|
- name: clippy
|
|
image: rust:1.99
|
|
commands:
|
|
- rustup component add clippy
|
|
- cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
|
|
- name: deny
|
|
image: rust:1.99
|
|
commands:
|
|
- cargo install cargo-deny --locked --version 0.18.9
|
|
- cargo deny check
|
|
|
|
- name: wait-for-postgres
|
|
image: postgres:18
|
|
commands:
|
|
- until pg_isready -h postgres -U postgres; do sleep 1; done
|
|
|
|
- name: test
|
|
image: rust:1.99
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/steep
|
|
commands:
|
|
- cargo test --workspace --all-targets -- --include-ignored
|
|
|
|
- name: container-build
|
|
image: quay.io/buildah/stable
|
|
privileged: true
|
|
volumes:
|
|
- /data/woodpecker-builds:/data
|
|
commands:
|
|
- buildah bud -f Containerfile -t steep-ci .
|