Skip to content

add github actions file (#1) #10

add github actions file (#1)

add github actions file (#1) #10

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