Skip to content

fix: go mod version format (#4) #23

fix: go mod version format (#4)

fix: go mod version format (#4) #23

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: run tests
jobs:
Test:
runs-on: ubuntu-latest
env:
GO_VERSION: "1.21"
GOPRIVATE: gitlab.com/nitrado/*
GOLANGCI_LINT_VERSION: v1.54.2
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Create .netrc
uses: extractions/netrc@v1
with:
machine: gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_TOKEN }}
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: |
go mod download
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
skip-pkg-cache: true
args: --go ${{ env.GO_VERSION }}
- name: Run tests
run: go test -race ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean --snapshot --skip=sign