Skip to content

Play with docker build #2891

Play with docker build

Play with docker build #2891

Workflow file for this run

name: Backend Unit Tests
on:
- push
- pull_request
jobs:
build:
uses: gmmcal/gmmcal.com.br/.github/workflows/docker.yml@actions
backend:
name: 'Unit: Backend'
runs-on: ubuntu-20.04
needs: build
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: gmmcalcombr_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Download an image
uses: ishworkh/container-image-artifact-download@v1.0.0
with:
image: "gmmcal:test"
- name: Run rubocop
run: |
docker run --network=${{ job.services.postgres.network }} -e DATABASE_URL='postgres://postgres:postgres@postgres:5432/gmmcalcombr_test' -e DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true --rm gmmcal:test