Skip to content

Commit

Permalink
repo: large scale refactor:
Browse files Browse the repository at this point in the history
- Swapped out the old cli package in lieu of Cobra.
- Added a more appropriate (simpler) logger for a basic CLI.
- Lots of little bug fixes and other misc refactoring along the way.

repo: more overall cleanup from large scale refactor. Mostly tightening up some core code and documentation.

ci: fix test step to not use make

ci: github workflow updates for failing workflows.

ci/lint: downgrade golangci-lint version to previous for GH action to work.

ci/test: remove CGOTEST refs in Makefile as race flag no longer requires it.

ci: standardized job names.

docs: update README.md to reflect CLI updates and be less tightly-coupled.
  • Loading branch information
DannyHinshaw committed Sep 26, 2024
1 parent 5923d55 commit 0df9c2b
Show file tree
Hide file tree
Showing 35 changed files with 1,435 additions and 1,096 deletions.
10 changes: 5 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Pinned Docker image versions
ALPINE_IMAGE_VERSION=alpine:3.18.3
GOLANG_IMAGE_VERSION=golang:1.21-alpine3.18
ALPINE_IMAGE=alpine:3.20
GOLANG_IMAGE=golang:1.23.1-alpine3.20

# Pinned Go tooling versions
GOFUMPT_VERSION=v0.5.0
GOLANGCI_LINT_VERSION=v1.55.1
PKGSITE_VERSION=v0.0.0-20231009172822-5f0513d53cff
GOFUMPT_VERSION=v0.7.0
GOLANGCI_LINT_VERSION=v1.60.3
PKGSITE_VERSION=v0.0.0-20240910173546-47024e57924e
19 changes: 0 additions & 19 deletions .github/workflows/build.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: GitHub Release

on:
push:
Expand All @@ -11,12 +11,14 @@ permissions:

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

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2

distribute:
uses: ./.github/workflows/dist.yaml
uses: ./.github/workflows/go-release.yaml
21 changes: 21 additions & 0 deletions .github/workflows/go-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Go Build

on:
push:
workflow_dispatch:

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build CLI
run: make build/cli
25 changes: 25 additions & 0 deletions .github/workflows/go-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Go Lint
on:
push:
workflow_dispatch:

permissions:
contents: read

jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: falti/[email protected]
id: dotenv

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: ${{ steps.dotenv.outputs.GOLANGCI_LINT_VERSION }}
args: --timeout 5m
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Distribute
name: Go Release

on:
workflow_call:

jobs:
distribute:
name: Distribute
name: distribute
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -17,8 +17,9 @@ jobs:
goos: darwin
- goarch: arm64
goos: windows

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test.yaml → .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: Test
name: Go Test

on: [ push, workflow_dispatch ]
on:
push:
workflow_dispatch:

jobs:
test:
name: test
runs-on: ubuntu-latest
name: Test
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Run tests
run: |
make test/full TOOLS=
make test GO=go
58 changes: 0 additions & 58 deletions .github/workflows/lint.yaml

This file was deleted.

10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# OS generated
.DS_Store

# IDE's
.idea/
.ideavimrc
.vscode/

# Build
bin/
tmp/
vendor/

/tmp

coverage.*
# Testing
coverage.*
Loading

0 comments on commit 0df9c2b

Please sign in to comment.