Skip to content

Go

Go #3220

Workflow file for this run

---
name: Go
on:
workflow_dispatch: null
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Run full test once a day
- cron: "0 0 * * *"
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
# https://github.com/actions/setup-go
- name: free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
sudo docker image prune --all --force
sudo docker builder prune -a
df -h
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
cache: false
go-version: 1.26.4
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: golangci-lint
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1
with:
# Required: the version of golangci-lint is required
# and must be specified without patch version:
# we always use the latest patch version.
version: v2.11.3
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
with:
install-only: true
- name: Show GoReleaser version
run: goreleaser --version
- name: Test
run: make test
- name: Build
run: make build
# Codecov should only be updated if make test is executed
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# if: ${{ github.event_name == 'schedule' }}
# Manage and run your integration tests with efficiency
# https://github.com/ovh/venom