Skip to content

Merge pull request #1519 from thaJeztah/fix_readme #369

Merge pull request #1519 from thaJeztah/fix_readme

Merge pull request #1519 from thaJeztah/fix_readme #369

Workflow file for this run

name: CI
# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: [push, pull_request]
env:
GOTOOLCHAIN: local
jobs:
lint:
name: Golang-CI Lint
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v9
cross:
name: Cross
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Build
run: |
for target in $(go tool dist list); do
echo "Building for $target"
GOOS=${target%/*} GOARCH=${target#*/} go build ./...
done
test:
name: Unit test
timeout-minutes: 10
strategy:
matrix:
go-version: [stable, oldstable, 1.23.x]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: go test -race -v ./...