Skip to content

Revamping GitHub actions setup #8

Revamping GitHub actions setup

Revamping GitHub actions setup #8

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ["1.21.x"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- run: go test -race -v -timeout 10s ./...
builds:
strategy:
fail-fast: true
matrix:
go-version: ["1.21.x"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: build --snapshot --clean
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
markdownlint-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nosborn/[email protected]
with:
files: docs/
config_file: .markdownlint.yaml
dot: true