Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
name: Build project
on: [ push, pull_request ]
name: CI
on:
push: {}
pull_request: {}
workflow_dispatch: {}
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
matrix:
version:
- "1.20"
- "1.21"
steps:
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ matrix.version }}

- name: Test
run: make test
uses: oapi-codegen/actions/.github/workflows/ci.yml@8ebfe4c83d051866a4af122ba602239fa3220e52 # v0.7.0
with:
lint_versions: '["1.25"]'
24 changes: 0 additions & 24 deletions .github/workflows/lint.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/tidy.yml

This file was deleted.

8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ help:
@echo " lint run linting"

$(GOBIN)/golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.55.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v2.10.1

.PHONY: tools
tools: $(GOBIN)/golangci-lint
Expand All @@ -18,11 +18,15 @@ lint: tools
git ls-files go.mod '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && $(GOBIN)/golangci-lint run ./...'

lint-ci: tools
git ls-files go.mod '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && $(GOBIN)/golangci-lint run ./... --out-format=github-actions --timeout=5m'
git ls-files go.mod '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && $(GOBIN)/golangci-lint run ./... --timeout=5m'

test:
git ls-files go.mod '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && go test -cover ./...'

tidy:
@echo "tidy..."
git ls-files go.mod '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && go mod tidy'

# Empty rule to make CI logic happy
.PHONY: generate
generate: ;