-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (29 loc) · 952 Bytes
/
backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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