Skip to content

fix(sandbox): satisfy revive — rename max param, document State consts #2

fix(sandbox): satisfy revive — rename max param, document State consts

fix(sandbox): satisfy revive — rename max param, document State consts #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
conventional-commits:
name: Conventional Commits Check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Conventional Commits
uses: webiny/action-conventional-commits@7f91b1595ca1951cdb671ddc9f07a49081ec5b69 # v1.4.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
allowed-commit-types: "feat,fix,cicd,chore,patch,release,test,docs,refactor,ci,dev,perf,build,revert"
lint:
name: Lint
runs-on: ubuntu-latest
needs: conventional-commits
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: go vet
run: go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.12.2
args: --timeout=5m
skip-cache: true
skip-save-cache: true
env:
GOPROXY: https://proxy.golang.org,direct
test:
name: Test
runs-on: ubuntu-latest
needs: lint
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
# The race detector requires cgo, so it is enabled here even though the
# library itself needs none. The integration-build job below pins
# CGO_ENABLED=0 to prove no cgo dependency creeps into the build.
- name: Run tests
env:
CGO_ENABLED: '1'
run: go test -race -cover -v ./...
# Integration tests need a gVisor-capable host, which hosted runners are not.
# Compiling them on every PR is what stops them rotting between the rare runs
# on a self-hosted box — a test that no longer builds is a test nobody runs.
integration-build:
name: Integration Tests (compile only)
runs-on: ubuntu-latest
needs: lint
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: Compile integration tests
env:
CGO_ENABLED: '0'
run: go build -tags integration ./... && go vet -tags integration ./...