ブロック末尾に入れていたdividerを削除 #156
Workflow file for this run
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
name: Test | |
on: | |
pull_request: | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: | |
- 1.x | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Cache Go modules | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
${{ runner.os }}-go- | |
- name: Install dependencies | |
run: go mod vendor | |
test: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
strategy: | |
matrix: | |
go-version: | |
- 1.x | |
package: | |
- . | |
- ./pkg/app | |
- ./pkg/command | |
- ./pkg/config | |
- ./pkg/env | |
- ./pkg/service | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Restore Go modules cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
${{ runner.os }}-go- | |
- name: go test | |
run: go test -v ${{ matrix.package }} | |
vet: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
strategy: | |
matrix: | |
go-version: | |
- 1.x | |
package: | |
- . | |
- ./pkg/app | |
- ./pkg/command | |
- ./pkg/config | |
- ./pkg/env | |
- ./pkg/service | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Restore Go modules cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
${{ runner.os }}-go- | |
- name: go vet | |
run: go vet ${{ matrix.package }} | |
gofmt: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
strategy: | |
matrix: | |
go-version: | |
- 1.x | |
package: | |
- . | |
- ./pkg/app | |
- ./pkg/command | |
- ./pkg/config | |
- ./pkg/env | |
- ./pkg/service | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Restore Go modules cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
${{ runner.os }}-go- | |
- name: gofmt | |
run: gofmt -e -l -w ${{ matrix.package }} | |
- name: Check diff | |
run: git diff --exit-code |