Skip to content

Commit 4fe979e

Browse files
authored
Merge pull request #1309 from traPtitech/fix/openapi-ci
各種依存関係のバージョン更新
2 parents 6fff832 + 6ca12fc commit 4fe979e

File tree

10 files changed

+260
-422
lines changed

10 files changed

+260
-422
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,19 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
- uses: actions/setup-go@v4
19+
- uses: actions/setup-go@v5
2020
with:
2121
go-version-file: 'go.mod'
22-
cache: false
23-
- uses: actions/[email protected]
24-
with:
25-
path: ~/go/pkg/mod
26-
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}
27-
restore-keys: |
28-
${{ runner.os }}-gomod-
2922
- run: go mod download
3023
build:
3124
name: Build
3225
runs-on: ubuntu-latest
3326
needs: [mod]
34-
env:
35-
GOCACHE: "/tmp/go/cache"
3627
steps:
3728
- uses: actions/checkout@v4
38-
- uses: actions/setup-go@v4
29+
- uses: actions/setup-go@v5
3930
with:
4031
go-version-file: 'go.mod'
41-
cache: false
42-
- uses: actions/[email protected]
43-
with:
44-
path: ~/go/pkg/mod
45-
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}
46-
restore-keys: |
47-
${{ runner.os }}-gomod-
48-
- uses: actions/[email protected]
49-
with:
50-
path: /tmp/go/cache
51-
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ github.sha }}
52-
restore-keys: |
53-
${{ runner.os }}-go-build-${{ github.ref }}-
54-
${{ runner.os }}-go-build-
5532
- run: go build -o anke-to
5633
- uses: actions/upload-artifact@v4
5734
with:
@@ -71,17 +48,10 @@ jobs:
7148
MYSQL_DATABASE: anke-to
7249
steps:
7350
- uses: actions/checkout@v4
74-
- uses: actions/setup-go@v4
51+
- uses: actions/setup-go@v5
7552
with:
7653
go-version-file: 'go.mod'
77-
cache: false
78-
- uses: actions/[email protected]
79-
with:
80-
path: ~/go/pkg/mod
81-
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}
82-
restore-keys: |
83-
${{ runner.os }}-gomod-
84-
- run: go install github.com/golang/mock/[email protected]
54+
- run: go install go.uber.org/mock/mockgen@latest
8555
- run: go generate ./...
8656
- run: go test ./model -v -coverprofile=coverage-model.txt -race -vet=off
8757
env:
@@ -96,9 +66,10 @@ jobs:
9666
MARIADB_HOSTNAME: 127.0.0.1
9767
MARIADB_DATABASE: anke-to
9868
- name: Upload coverage data
99-
uses: codecov/codecov-action@v5.1.2
69+
uses: codecov/codecov-action@v5
10070
with:
10171
files: ./coverage-model.txt ./coverage-controller.txt
72+
token: ${{ secrets.CODECOV_TOKEN }}
10273
- uses: actions/upload-artifact@v4
10374
with:
10475
name: coverage-model.txt
@@ -112,22 +83,23 @@ jobs:
11283
runs-on: ubuntu-latest
11384
steps:
11485
- uses: actions/checkout@v4
115-
- uses: actions/setup-go@v4
86+
- uses: actions/setup-go@v5
11687
with:
11788
go-version-file: 'go.mod'
89+
- run: go install go.uber.org/mock/mockgen@latest
90+
- run: go generate ./...
11891
- name: golangci-lint
119-
uses: reviewdog/action-golangci-lint@v2.3
92+
uses: reviewdog/action-golangci-lint@v2
12093
with:
12194
reporter: github-pr-check
12295
github_token: ${{ secrets.GITHUB_TOKEN }}
123-
fail_on_error: true
96+
fail_level: error
12497
spectral:
12598
name: Spectral
12699
runs-on: ubuntu-latest
127100
steps:
128101
- uses: actions/checkout@v4
129102
- name: Spectral checks
130-
uses: stoplightio/spectral-action@v0.8.7
103+
uses: stoplightio/spectral-action@latest
131104
with:
132-
file_glob: docs/swagger/*.yaml
133-
repo_token: ${{ secrets.GITHUB_TOKEN }}
105+
file_glob: docs/swagger/*.yaml

.github/workflows/master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
username: traPtitech
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828
- name: Build and push
29-
uses: docker/build-push-action@v5
29+
uses: docker/build-push-action@v6
3030
with:
3131
context: .
3232
push: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
username: traPtitech
2626
password: ${{ secrets.GITHUB_TOKEN }}
2727
- name: Build and push
28-
uses: docker/build-push-action@v5
28+
uses: docker/build-push-action@v6
2929
with:
3030
context: .
3131
push: true

.golangci.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
run:
2-
skip-dirs:
3-
- tuning/openapi
4-
1+
version: "2"
52
linters:
63
enable:
7-
- govet
8-
- errcheck
9-
- staticcheck
10-
- unused
11-
- gosimple
12-
- structcheck
13-
- varcheck
14-
- ineffassign
15-
- deadcode
16-
- typecheck
174
- revive
5+
exclusions:
6+
generated: lax
7+
presets:
8+
- comments
9+
- common-false-positives
10+
- legacy
11+
- std-error-handling
12+
paths:
13+
- third_party$
14+
- builtin$
15+
- examples$
16+
- tuning/openapi
17+
- model/mock_model
18+
formatters:
19+
enable:
1820
- gofmt
21+
exclusions:
22+
generated: lax
23+
paths:
24+
- third_party$
25+
- builtin$
26+
- examples$
27+
- tuning/openapi
28+
- model/mock_model

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: init
22
init:
33
go mod download
4-
go install github.com/golang/mock/mockgen
4+
go install go.uber.org/mock/mockgen
55
go install github.com/google/wire/cmd/wire
66

77
.PHONY: dev

controller/middleware_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
"testing"
1010
"time"
1111

12-
"github.com/golang/mock/gomock"
1312
"github.com/labstack/echo/v4"
1413
"github.com/stretchr/testify/assert"
1514
"github.com/traPtitech/anke-to/model"
1615
"github.com/traPtitech/anke-to/model/mock_model"
16+
"go.uber.org/mock/gomock"
1717
"gopkg.in/guregu/null.v4"
1818
)
1919

docker/test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN go mod download
1616

1717
COPY . .
1818

19-
RUN go install github.com/golang/mock/mockgen \
19+
RUN go install go.uber.org/mock/mockgen \
2020
&& go generate ./model ./traq
2121

2222
ENTRYPOINT dockerize -timeout 10s -wait tcp://mysql:3306 go test ./model ./router -v cover

go.mod

Lines changed: 46 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,94 @@
11
module github.com/traPtitech/anke-to
22

3-
go 1.22.2
3+
go 1.24.1
44

55
require (
6-
github.com/golang/mock v1.6.0
7-
github.com/golang/protobuf v1.5.3 // indirect
86
github.com/google/subcommands v1.2.0 // indirect
9-
github.com/google/wire v0.5.0
10-
github.com/labstack/echo/v4 v4.12.0
7+
github.com/google/wire v0.6.0
8+
github.com/labstack/echo/v4 v4.13.3
119
github.com/mattn/go-isatty v0.0.20 // indirect
12-
github.com/stretchr/testify v1.9.0
13-
golang.org/x/crypto v0.23.0 // indirect
14-
golang.org/x/mod v0.17.0 // indirect
15-
golang.org/x/net v0.25.0 // indirect
16-
golang.org/x/oauth2 v0.10.0
17-
golang.org/x/sync v0.8.0
18-
golang.org/x/sys v0.20.0 // indirect
19-
golang.org/x/text v0.15.0 // indirect
20-
golang.org/x/tools v0.21.0 // indirect
21-
google.golang.org/appengine v1.6.7 // indirect
22-
google.golang.org/protobuf v1.33.0 // indirect
10+
github.com/stretchr/testify v1.10.0
11+
golang.org/x/crypto v0.38.0 // indirect
12+
golang.org/x/mod v0.24.0 // indirect
13+
golang.org/x/net v0.40.0 // indirect
14+
golang.org/x/oauth2 v0.30.0
15+
golang.org/x/sync v0.14.0
16+
golang.org/x/sys v0.33.0 // indirect
17+
golang.org/x/text v0.25.0 // indirect
18+
golang.org/x/tools v0.33.0 // indirect
19+
google.golang.org/protobuf v1.36.6 // indirect
2320
gopkg.in/yaml.v3 v3.0.1 // indirect
2421
)
2522

2623
require (
2724
github.com/davecgh/go-spew v1.1.1 // indirect
28-
github.com/go-playground/validator/v10 v10.14.1
29-
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
25+
github.com/go-playground/validator/v10 v10.26.0
3026
github.com/jinzhu/inflection v1.0.0 // indirect
3127
github.com/labstack/gommon v0.4.2 // indirect
32-
github.com/mattn/go-colorable v0.1.13 // indirect
28+
github.com/mattn/go-colorable v0.1.14 // indirect
3329
github.com/pmezard/go-difflib v1.0.0 // indirect
3430
github.com/valyala/bytebufferpool v1.0.0 // indirect
3531
github.com/valyala/fasttemplate v1.2.2 // indirect
36-
golang.org/x/time v0.5.0 // indirect
32+
golang.org/x/time v0.11.0 // indirect
3733
)
3834

3935
require (
36+
filippo.io/edwards25519 v1.1.0 // indirect
37+
github.com/dprotaso/go-yit v0.0.0-20240618133044-5a0af90af097 // indirect
4038
github.com/go-playground/locales v0.14.1 // indirect
4139
github.com/go-playground/universal-translator v0.18.1 // indirect
42-
github.com/labstack/echo-contrib v0.12.0
43-
github.com/leodido/go-urn v1.2.4 // indirect
40+
github.com/leodido/go-urn v1.4.0 // indirect
41+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
42+
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
43+
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
44+
github.com/speakeasy-api/jsonpath v0.6.1 // indirect
45+
github.com/speakeasy-api/openapi-overlay v0.10.1 // indirect
46+
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
4447
)
4548

4649
require (
4750
github.com/beorn7/perks v1.0.1 // indirect
48-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
49-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
50-
github.com/prometheus/client_model v0.2.0 // indirect
51-
github.com/prometheus/common v0.32.1 // indirect
52-
github.com/prometheus/procfs v0.7.3 // indirect
53-
gorm.io/gorm v1.25.5
51+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
52+
github.com/prometheus/client_model v0.6.2 // indirect
53+
github.com/prometheus/common v0.63.0 // indirect
54+
github.com/prometheus/procfs v0.16.1 // indirect
55+
gorm.io/gorm v1.26.0
5456
)
5557

5658
require (
5759
github.com/jinzhu/now v1.1.5 // indirect
58-
gorm.io/driver/mysql v1.5.2
60+
gorm.io/driver/mysql v1.5.7
5961
)
6062

6163
require (
62-
github.com/go-sql-driver/mysql v1.7.0 // indirect
63-
github.com/prometheus/client_golang v1.12.1
64+
github.com/go-sql-driver/mysql v1.9.2 // indirect
65+
github.com/prometheus/client_golang v1.22.0
6466
gopkg.in/guregu/null.v4 v4.0.0
65-
gorm.io/plugin/prometheus v0.0.0-20210820101226-2a49866f83ee
67+
gorm.io/plugin/prometheus v0.1.0
6668
)
6769

6870
require (
69-
github.com/deepmap/oapi-codegen v1.16.2
70-
github.com/go-gormigrate/gormigrate/v2 v2.1.1
71+
github.com/deckarep/golang-set/v2 v2.8.0
72+
github.com/go-gormigrate/gormigrate/v2 v2.1.4
73+
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1
74+
github.com/traPtitech/go-traq v0.0.0-20250411085910-749ba86cfa5b
75+
go.uber.org/mock v0.5.2
7176
)
7277

7378
require (
74-
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
75-
github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 // indirect
76-
github.com/traPtitech/go-traq v0.0.0-20240420012203-0152d96098b0 // indirect
77-
)
78-
79-
require (
80-
github.com/getkin/kin-openapi v0.124.0 // indirect
81-
github.com/go-openapi/jsonpointer v0.20.2 // indirect
82-
github.com/go-openapi/swag v0.22.8 // indirect
83-
github.com/gorilla/mux v1.8.1 // indirect
84-
github.com/invopop/yaml v0.2.0 // indirect
79+
github.com/getkin/kin-openapi v0.132.0
80+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
81+
github.com/go-openapi/swag v0.23.1 // indirect
8582
github.com/josharian/intern v1.0.0 // indirect
86-
github.com/mailru/easyjson v0.7.7 // indirect
83+
github.com/mailru/easyjson v0.9.0 // indirect
8784
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
88-
github.com/oapi-codegen/echo-middleware v1.0.1
8985
github.com/perimeterx/marshmallow v1.1.5 // indirect
9086
gopkg.in/yaml.v2 v2.4.0 // indirect
9187
)
9288

9389
require (
9490
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
95-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
96-
github.com/gofrs/uuid v4.4.0+incompatible
97-
github.com/google/uuid v1.5.0 // indirect
98-
github.com/oapi-codegen/runtime v1.1.1 // indirect
91+
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
92+
github.com/google/uuid v1.6.0
93+
github.com/oapi-codegen/runtime v1.1.1
9994
)

0 commit comments

Comments
 (0)