Skip to content

Commit

Permalink
chore: update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 9, 2025
1 parent d3473c3 commit 186cc68
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 26 deletions.
1 change: 0 additions & 1 deletion .errcheck_exclude

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
name: Go

on:
push:
branches:
- master
- main
pull_request:
schedule:
# Run every 12 hours, at the 15 minute mark. E.g.
# 2020-11-29 00:15:00 UTC, 2020-11-29 12:15:00 UTC, 2020-11-30 00:15:00 UTC
- cron: '15 */12 * * *'

jobs:

build:
name: Build and Unit Test
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.15

- name: Check out code
uses: actions/checkout@v2
go-version: stable

- name: Build
run: go build -v ./...

- name: Test
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Upload Coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
18 changes: 8 additions & 10 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
name: golangci-lint

on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
schedule:
# Run every 12 hours, at the 15 minute mark. E.g.
# 2020-11-29 00:15:00 UTC, 2020-11-29 12:15:00 UTC, 2020-11-30 00:15:00 UTC
- cron: '15 */12 * * *'

jobs:
golangci:
name: Lint Sourcecode
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: v1.29
version: v1.63.4
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: clean check test build

default: clean check test build

clean:
rm -rf dist/ cover.out

test: clean
go test -v -cover ./...

check:
golangci-lint run

build:
go build -ldflags "-s -w" -trimpath ./cmd/goacmedns-register/

0 comments on commit 186cc68

Please sign in to comment.