Skip to content

Tests

Tests #1887

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
paths:
- '.github/**'
- '**.go'
- go.mod
- go.sum
schedule:
- cron: '42 17 * * 5'
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
env:
GO_VERSION: '1.22.5'
GOLANGCI_LINT_VERSION: 'v1.60.3'
jobs:
build:
name: build-tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Tests
run: make .build-tests
- name: Upload to codecov
uses: codecov/codecov-action@v5
govulncheck:
name: govulncheck
runs-on: ubuntu-latest
steps:
- name: govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: '${{ env.GO_VERSION }}'
go-package: ./...
golangci:
name: golanci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: '${{ env.GOLANGCI_LINT_VERSION }}'
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true