Skip to content

Commit

Permalink
Merge pull request #4 from gregwebs/go-build
Browse files Browse the repository at this point in the history
workflow actions for building
  • Loading branch information
gregwebs authored Dec 11, 2024
2 parents aaadb46 + fb9f0eb commit e77e778
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: build
on:
push:
tags:
- v*
branches:
- main
pull_request:
merge_group:

permissions:
contents: read
pull-requests: read

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: setup
uses: actions/setup-go@v4
with:
go-version: '>=1.23.2'
cache: false
check-latest: true

- name: test
run: go build . && go test .

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=3m
only-new-issues: true

- name: Mod Tidy
run: go mod tidy && git diff --exit-code -- go.mod go.sum || (echo "go modules are not tidy, run 'go mod tidy'." && exit 1)


license-check:
runs-on: ubuntu-latest
name: License Check
steps:
- name: checkout
uses: actions/checkout@v3

- name: Get google/go-licenses package
shell: bash
run: go install github.com/google/go-licenses@latest

- name: Run Check
run: $HOME/go/bin/go-licenses check . --allowed_licenses Apache-2.0,MIT,BSD-2-Clause
shell: bash

govulncheck:
name: govulncheck
runs-on: ubuntu-latest
steps:
- id: govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: 1.23.2
go-package: ./...
cache: false

0 comments on commit e77e778

Please sign in to comment.