Skip to content

Commit

Permalink
Update jsonschema-go and CI (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop authored Jul 23, 2021
1 parent 9c8acaf commit f3fc49f
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Count Lines Of Code
id: loc
run: |
curl -OL https://github.com/vearutop/builds/releases/download/sccdiff-v0/sccdiff && chmod +x sccdiff
curl -OL https://github.com/vearutop/sccdiff/releases/download/v1.0.1/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: golangci/[email protected]
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.39.0
version: v1.41.1

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/gorelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This script is provided by github.com/bool64/dev.
name: gorelease
on:
pull_request:
env:
GO111MODULE: "on"
jobs:
gorelease:
strategy:
matrix:
go-version: [ 1.16.x ]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Gorelease cache
uses: actions/cache@v2
with:
path: |
~/go/bin/gorelease
key: ${{ runner.os }}-gorelease
- name: Gorelease
id: gorelease
run: |
test -e ~/go/bin/gorelease || go install golang.org/x/exp/cmd/gorelease@latest
gorelease
OUTPUT=$(gorelease)
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=report::$OUTPUT"
- name: Comment Gorelase Report
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: gorelease
message: |
### Exported API Changes Report
```
${{ steps.gorelease.outputs.report }}
```
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ linters-settings:
linters:
enable-all: true
disable:
- tagliatelle
- goerr113
- funlen
- gocyclo
Expand All @@ -37,6 +38,7 @@ linters:
- forcetypeassert
- scopelint # deprecated
- ifshort # too many false positives
- golint # deprecated

issues:
exclude-use-default: false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
JSON_CLI_VERSION := "v1.8.6"
#GOLANGCI_LINT_VERSION := "v1.39.0" # Optional configuration to pinpoint golangci-lint version.
#GOLANGCI_LINT_VERSION := "v1.41.1" # Optional configuration to pinpoint golangci-lint version.

# The head of Makefile determines location of dev-go to include standard targets.
GO ?= go
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/swaggest/openapi-go
go 1.13

require (
github.com/bool64/dev v0.1.33
github.com/bool64/dev v0.1.36
github.com/stretchr/testify v1.7.0
github.com/swaggest/assertjson v1.6.4
github.com/swaggest/jsonschema-go v0.3.19
github.com/swaggest/refl v0.1.7
github.com/swaggest/assertjson v1.6.6
github.com/swaggest/jsonschema-go v0.3.20
github.com/swaggest/refl v1.0.0
gopkg.in/yaml.v2 v2.4.0
)
18 changes: 9 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/bool64/dev v0.1.17/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
github.com/bool64/dev v0.1.25/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
github.com/bool64/dev v0.1.27/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
github.com/bool64/dev v0.1.33 h1:/uq/AvZurOfrgUkH9yLxWCHhNtccAY/gIIAceTKNQsc=
github.com/bool64/dev v0.1.33/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
github.com/bool64/dev v0.1.35/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
github.com/bool64/dev v0.1.36 h1:ZUyNrmb383OeHUSjtncODyq9RSLoDpEWxHvo5yQGhis=
github.com/bool64/dev v0.1.36/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
github.com/bool64/shared v0.1.3 h1:gj7XZPYa1flQsCg3q9AIju+W2A1jaexK0fdFu2XtaG0=
github.com/bool64/shared v0.1.3/go.mod h1:RF1p1Oi29ofgOvinBpetbF5mceOUP3kpMkvLbWOmtm0=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -57,12 +57,12 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/swaggest/assertjson v1.6.4 h1:SZy0H6Dyi+2Jn1PfKBFk+uwQ+3FcwtPthEpcpV84xTg=
github.com/swaggest/assertjson v1.6.4/go.mod h1:HAXV18oavcbNHwN6wvfzYVrLuAoi3/mJ6sN0ZgNMX9U=
github.com/swaggest/jsonschema-go v0.3.19 h1:Fa3R5ttSkmqTt1s124JGvxj1zxtngJExplTn3DTunEk=
github.com/swaggest/jsonschema-go v0.3.19/go.mod h1:NQCceV7I4/UuAy0IwCaDzgyN9ODl9F1s6/egrE2pC3U=
github.com/swaggest/refl v0.1.7 h1:pK2nWacMS6MIgeEdRVfmNUAxKih6vHIUF59osZrxpmY=
github.com/swaggest/refl v0.1.7/go.mod h1:acYd5x8NNxivp+ZHdRZKJYz66n/qjo3Q9Sa/jAivljQ=
github.com/swaggest/assertjson v1.6.6 h1:QO//07sfx9KR6h4t/8L+I5qOWUifLnu8gblhFYwkVQM=
github.com/swaggest/assertjson v1.6.6/go.mod h1:HNfIAKxJJkeDmtrBU01dcWvEFjhghO96gx9Eo4rRjIc=
github.com/swaggest/jsonschema-go v0.3.20 h1:ziunzl/iu5gm7OPWI9dkLOPte4GrZIkRhQNnycL18IA=
github.com/swaggest/jsonschema-go v0.3.20/go.mod h1:kTYngQ48oh1Wx+exL8EHTCSpheYX9JY/IgtOp9eVcZY=
github.com/swaggest/refl v1.0.0 h1:yAFdjLQjmFuH4FHiD+HMaDUbF4cW0PbH5uhNoN4bme4=
github.com/swaggest/refl v1.0.0/go.mod h1:acYd5x8NNxivp+ZHdRZKJYz66n/qjo3Q9Sa/jAivljQ=
github.com/yosuke-furukawa/json5 v0.1.2-0.20201207051438-cf7bb3f354ff/go.mod h1:sw49aWDqNdRJ6DYUtIQiaA3xyj2IL9tjeNYmX2ixwcU=
github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=
github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
Expand Down

0 comments on commit f3fc49f

Please sign in to comment.