Skip to content

Merge pull request #16 from oinume/makefile #10

Merge pull request #16 from oinume/makefile

Merge pull request #16 from oinume/makefile #10

Workflow file for this run

name: backend
on:
- push
env:
CACHE_VERSION: 1
GOPATH: /home/runner/go
jobs:
lint:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 20
env:
GOPATH: /home/runner/work/go
GOBIN: /home/runner/work/go/bin
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Go
id: go
uses: actions/setup-go@v5
with:
cache: true
cache-dependency-path: "go.sum"
go-version-file: "go.mod"
- name: Build
run: |
make build
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- id: go
uses: actions/setup-go@v5
with:
cache: true
cache-dependency-path: "go.sum"
go-version-file: "go.mod"
- name: Run test
run: |
make test GO_TEST="go test -v -race -coverprofile=coverage.txt -covermode=atomic"
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.txt
fail_ci_if_error: false