Skip to content

Bump actions/setup-go from 3 to 5 #101

Bump actions/setup-go from 3 to 5

Bump actions/setup-go from 3 to 5 #101

Workflow file for this run

# This GitHub action runs your tests for each commit push and/or PR. Optionally
# you can turn it on using a cron schedule for regular testing.
#
name: Tests
on:
push:
paths-ignore:
- 'README.md'
# For systems with an upstream API that could drift unexpectedly (like most SaaS systems, etc.),
# we recommend testing at a regular interval not necessarily tied to code changes. This will
# ensure you are alerted to something breaking due to an API change, even if the code did not
# change.
# schedule:
# - cron: '0 13 * * *'
jobs:
# ensure the code builds...
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Docker Compose
uses: docker/setup-buildx-action@v2
- name: Start Docker Compose services
run: |
docker compose -f docker-compose.yml up -d --wait
timeout-minutes: 5
- name: Get dependencies
run: |
go mod download
- name: Check go style
run: |
echo "If this command fails you should run go fmt \"./...\""
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "Code style differences detected:"
gofmt -s -l -d .
exit 1
fi
- name: Build
run: |
go build ./...
- name: Unit Tests
timeout-minutes: 15
run: |
go test -v -cover ./...