name: Build Project on: [] jobs: test: runs-on: ubuntu-latest container: image: rust:latest # Service containers to run with `container-job` services: # Label used to access the service container db: # Docker Hub image image: postgres:latest # Provide the password for postgres env: POSTGRES_USER: dev POSTGRES_PASSWORD: dev POSTGRES_DB: iot # Set health checks to wait until postgres has started options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - run: apt update && apt install nodejs -y - name: Checkout Code uses: actions/checkout@v2 - name: Run migrations run: cargo install sqlx-cli && sqlx migrate run - name: Running cargo build run: cargo build --release