Skip to content

Commit

Permalink
test on go v1.19 and cleanup (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
SVilgelm authored Aug 23, 2022
1 parent a4d9d86 commit 318e19f
Show file tree
Hide file tree
Showing 42 changed files with 478 additions and 702 deletions.
10 changes: 0 additions & 10 deletions .github/Brewfile

This file was deleted.

10 changes: 0 additions & 10 deletions .github/goreleaser-lib.yml

This file was deleted.

28 changes: 6 additions & 22 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ concurrency:
group: ${{ format('{0}-{1}', github.workflow, github.head_ref) }}
cancel-in-progress: true

env:
GO: "1.18"

jobs:
CodeQL:
runs-on: ubuntu-latest
Expand All @@ -36,14 +33,18 @@ jobs:

UnitTests:
runs-on: ubuntu-latest
strategy:
matrix:
go:
- 1.18
- 1.19
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
stable: false
go-version: ${{ env.GO }}
go-version: ${{ matrix.go }}
- name: gofmt
run: diff -u <(echo -n) <(gofmt -l . )
- name: go vet
Expand All @@ -56,20 +57,3 @@ jobs:
uses: codecov/codecov-action@v3.1.0
with:
file: ./coverage.out

GolangCI-Lint:
if: "false"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
stable: false
go-version: ${{ env.GO }}
- name: Run GolangCi-Lint
uses: golangci/golangci-lint-action@v3.2.0
with:
version: latest
skip-build-cache: true
63 changes: 0 additions & 63 deletions .github/workflows/release.yaml

This file was deleted.

77 changes: 0 additions & 77 deletions .golangci.yml

This file was deleted.

19 changes: 5 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
BREWFILE=./.github/Brewfile
all: install tidy lint fmt test

ifeq ($(shell uname), Darwin)
all: brew-install
endif

all: go-install tidy lint test

brew-install:
@brew bundle --file $(BREWFILE)

go-install:
install:
@go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest

run-test:
test:
@go test -cover -race ./...

test: run-test
fmt:
@go fmt ./...

# @golangci-lint run --fix ./...
lint:
@go vet ./...
@go vet -vettool=$(which fieldalignment) ./...
Expand Down
1 change: 0 additions & 1 deletion spec/bool_or_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,4 @@ func TestAdditionalPropertiesJSON(t *testing.T) {
})
})
}

}
27 changes: 13 additions & 14 deletions spec/callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ import (
// https://spec.openapis.org/oas/v3.1.0#callback-object
//
// Example:
// myCallback:
// '{$request.query.queryUrl}':
// post:
// requestBody:
// description: Callback payload
// content:
// 'application/json':
// schema:
// $ref: '#/components/schemas/SomePayload'
// responses:
// '200':
// description: callback successfully processed
//
// myCallback:
// '{$request.query.queryUrl}':
// post:
// requestBody:
// description: Callback payload
// content:
// 'application/json':
// schema:
// $ref: '#/components/schemas/SomePayload'
// responses:
// '200':
// description: callback successfully processed
type Callback struct {
Callback map[string]*RefOrSpec[Extendable[PathItem]]
}
Expand Down Expand Up @@ -65,5 +66,3 @@ func (o *Callback) MarshalYAML() (any, error) {
func (o *Callback) UnmarshalYAML(node *yaml.Node) error {
return node.Decode(&o.Callback)
}

func (o Callback) OpenAPIConstraint() {}
Loading

0 comments on commit 318e19f

Please sign in to comment.