name: Build and Test Project on: pull_request: jobs: test: runs-on: ubuntu-latest container: image: gitea.tobiasmaier.me/tobimai/devcontainer-rust:2.2 options: --user root services: db: image: postgres:latest env: POSTGRES_USER: dev POSTGRES_PASSWORD: dev POSTGRES_DB: iot options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - name: Checkout Code uses: actions/checkout@v2 - name: Run migrations run: sqlx migrate run - name: Running cargo build run: cargo build --release - name: Running cargo build run: cargo test