Update docker-image.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Build and Test | |
on: | |
push: | |
branches: | |
- main # ajuste conforme a nome da sua branch principal | |
pull_request: | |
branches: | |
- main # ajuste conforme a nome da sua branch principal | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.22 # ajuste conforme a versão do seu Go | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Build | |
run: go build -o payroll-api ./cmd/main.go | |
- name: Run tests | |
run: go test ./... |