Skip to content

feat: commit 06 of lesson 05 of the "Integração Contínua: Pipeline Do… #30

feat: commit 06 of lesson 05 of the "Integração Contínua: Pipeline Do…

feat: commit 06 of lesson 05 of the "Integração Contínua: Pipeline Do… #30

Workflow file for this run

name: Go
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
test:
strategy:
matrix:
go_version: ['>=1.18']
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
env:
HOST: localhost
PORT: 5432
USER: root
PASSWORD: root
DBNAME: root
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}
- name: Build DB
run: docker compose build
- name: Set up DB
run: docker compose up -d
- name: Test
run: go test -v ./main_test.go
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: go build -v ./main.go
- uses: actions/upload-artifact@v4
with:
name: programa
path: main
docker:
needs: build
uses: ./.github/workflows/docker.yml
secrets: inherit