Skip to content

Add dockerfile (#4) #16

Add dockerfile (#4)

Add dockerfile (#4) #16

Workflow file for this run

name: Integração Contínua
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Inicia banco
run: docker compose up -d postgres
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
args: controllers/ database/ models/ routes/
- name: Test
run: DB_HOST=${{ secrets.DB_HOST }} DB_PASSWORD=${{ secrets.DB_PASSWORD }} DB_USER=${{ secrets.DB_USER }} DB_NAME=${{ secrets.DB_NAME }} DB_PORT=${{ secrets.DB_PORT }} go test -v main_test.go
- name: Build
run: go build main.go
- name: Projeto compilado
uses: actions/upload-artifact@v4
with:
name: projeto_compilado
path: main