name: Rust
on:
push:
branches: [ main, dev/* ]
pull_request:
branches: [ main, dev/* ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: tests
POSTGRES_PASSWORD: tests
POSTGRES_DB: tests
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Build (features = ["debug-logs"])
run: cargo build --verbose --features debug-logs
- name: Run tests
run: cargo test --verbose
- name: Run tests (features = ["debug-logs"])
run: cargo test --verbose --features debug-logs