Skip to content

Only run GitHub Action on push to main #24

Only run GitHub Action on push to main

Only run GitHub Action on push to main #24

Workflow file for this run

---
name: Build and test
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build
run: go build -v ./
- name: Test
run: go test -v ./ -race
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: "Run golangci-lint"
uses: golangci/golangci-lint-action@v3