Skip to content

Merge pull request #6 from AdautoDCJunior/lesson-01-ci-pipeline-docke… #14

Merge pull request #6 from AdautoDCJunior/lesson-01-ci-pipeline-docke…

Merge pull request #6 from AdautoDCJunior/lesson-01-ci-pipeline-docke… #14

Workflow file for this run

name: Go
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
test:
strategy:
matrix:
go_version: ['1.17', '1.18', '>=1.18']
os: ['ubuntu-latest', 'ubuntu-20.04']
runs-on: ${{ matrix.os }}
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