Skip to content

Create go.yml

Create go.yml #1

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
pull-requests: read
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: go mod download
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.54