Skip to content

simplified the testing apparatus #6

simplified the testing apparatus

simplified the testing apparatus #6

Workflow file for this run

name: CI
on:
pull_request: {}
push: {}
permissions: write-all
jobs:
# ===================================
# BUILD-IT, TEST-IT, BOP-IT, BOP-IT
# ===================================
test:
name: Build & Test
strategy:
matrix:
go-version: ['1.21']
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Build
run: go build -v -o /dev/null .
- name: Test
run: go test -v ./...
# ===================================
# LICK SOME LINT
# ===================================
golangci:
name: Lint Licker
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
# show file name and line numbers in output
args: --timeout 15m0s --verbose --out-${NO_FUTURE}format colored-line-number -D errcheck
# ===================================
# RELEASE BINARIES (on push "v*" tag)
# ===================================
release_binaries:
name: Release Binaries
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: goreleaser
uses: docker://goreleaser/goreleaser:latest
env:
GITHUB_USER: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
args: release --config .github/goreleaser.yml