From 662a97b2ac7bc923e59c41f267f7f39884dc30df Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Sat, 21 Dec 2024 20:37:01 -0600 Subject: [PATCH] ci: fixup some ci steps --- .github/workflows/ci.yaml | 11 +++++------ .gitignore | 17 +++++++++++++++++ Justfile | 12 +++++++++++- 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 56d9f96..fe0f0af 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,12 +27,11 @@ jobs: with: go-version-file: go.mod cache-dependency-path: '**/go.sum' - - uses: golangci/golangci-lint-action@v6 - with: - version: v1.62.2 - skip-cache: true - args: --config .github/workflows/scripts/golangci.yaml + - name: Show System + run: | + uname -a + just sysinfo - name: Run Go Test run: | - just test + just init tidy lint test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5f40696 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*~ +~* + +# OS files +**/.DS_Store + +# Build artifacts +site + +# Go workspace file +go.work +go.work.sum + +# Local source and binary files +.src/ +.bin/ + diff --git a/Justfile b/Justfile index 3135ff7..dc2573e 100644 --- a/Justfile +++ b/Justfile @@ -33,5 +33,15 @@ vet: # apply golangci-lint linters on source tree [group('lint')] lint: vet - golangci-lint run --config .github/workflows/scripts/golangci.yaml + $GOBIN/golangci-lint run --config .github/workflows/scripts/golangci.yaml + +# show host system information +[group('build')] +@sysinfo: + echo "{{os()/arch()}} {{num_cpus()}}c" + +# locally install build dependencies +[group('build')] +init: + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2