-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #544 from traPtitech/fix/revert-v1.5.0
Revert v1.5.0
- Loading branch information
Showing
31 changed files
with
352 additions
and
1,002 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,35 +7,68 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
mod: | ||
name: Server Modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }} | ||
- run: go mod download | ||
build: | ||
name: Server Build | ||
runs-on: ubuntu-latest | ||
needs: [mod] | ||
env: | ||
GOCACHE: "/tmp/go/cache" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
go-version-file: ./go.mod | ||
- name: mod | ||
run: go mod download | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-gomod- | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /tmp/go/cache | ||
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-go-build-${{ github.ref }}- | ||
${{ runner.os }}-go-build- | ||
- name: build | ||
run: go build | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: booQ | ||
path: booQ | ||
lint: | ||
name: Server Lint | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
needs: [mod] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version-file: ./go.mod | ||
go-version: 1.15 | ||
- name: Install reviewdog | ||
run: curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | ||
- name: Install golangci-lint | ||
run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-gomod- | ||
- name: golangci-lint | ||
run: golangci-lint run --out-format=line-number | reviewdog -f=golangci-lint -name=golangci-lint -reporter=github-check | ||
env: | ||
|
@@ -45,6 +78,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [build] | ||
env: | ||
GOCACHE: "/tmp/go/cache" | ||
MYSQL_USER: root | ||
MYSQL_PASSWORD: password | ||
MYSQL_DATABASE: booq_test | ||
|
@@ -58,10 +92,23 @@ jobs: | |
ports: | ||
- 3306:3306 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-gomod- | ||
- uses: actions/cache@v2 | ||
with: | ||
go-version-file: ./go.mod | ||
path: /tmp/go/cache | ||
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-go-build-${{ github.ref }}- | ||
${{ runner.os }}-go-build- | ||
- name: Setup DB | ||
run: go run .github/workflows/init.go | ||
- name: Run model tests | ||
|
@@ -72,9 +119,9 @@ jobs: | |
name: OpenApi Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v2 | ||
- name: Spectral checks | ||
uses: stoplightio/[email protected].10 | ||
uses: stoplightio/[email protected].2 | ||
with: | ||
file_glob: docs/swagger.yml | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
FROM golang:1.20.0-alpine AS build | ||
FROM golang:1.15.0-alpine AS build | ||
ENV CGO_ENABLED=0 | ||
ENV DOCKERIZE_VERSION v0.6.1 | ||
RUN apk add --update --no-cache git && \ | ||
apk --update add tzdata && \ | ||
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \ | ||
apk del tzdata && \ | ||
rm -rf /var/cache/apk/* | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \ | ||
tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \ | ||
rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
|
||
WORKDIR /app | ||
RUN go install github.com/cosmtrek/air@latest | ||
|
||
COPY go.mod go.sum ./ | ||
WORKDIR /go/src/github.com/traPtitech/booQ | ||
RUN go get github.com/pilu/fresh | ||
COPY ./go.* ./ | ||
RUN go mod download | ||
|
||
CMD ["air"] | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.