Merge pull request #478 from traPtitech/dependabot/go_modules/google.… #860
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- "**" | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: ./go.mod | |
- run: go mod download | |
- run: go build -v ./... | |
test-unit: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: ./go.mod | |
- run: go test -v $(go list ./... | grep -v "/infra/") | |
test-repo: | |
name: Repository Test | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: ./go.mod | |
- name: Run repository tests | |
run: | | |
go test -v ./infra... | |
golangci-lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
args: "--timeout=5m" | |
install-mode: goinstall |