mirror of
https://github.com/safing/structures
synced 2025-04-06 18:39:10 +00:00
55 lines
971 B
YAML
55 lines
971 B
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
jobs:
|
|
lint:
|
|
name: Linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '^1.21'
|
|
|
|
- name: Get dependencies
|
|
run: go mod download
|
|
|
|
- name: Run golangci-lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.52.2
|
|
only-new-issues: true
|
|
args: -c ./.golangci.yml --timeout 15m
|
|
|
|
- name: Run go vet
|
|
run: go vet ./...
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '^1.21'
|
|
|
|
- name: Get dependencies
|
|
run: go mod download
|
|
|
|
- name: Run tests
|
|
run: ./test --test-only
|