Skip to content

Commit

Permalink
update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiban committed Oct 5, 2024
1 parent 03d3d3d commit b60286b
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
name: Go

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
on: [push, pull_request]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic

- name: Codecov
uses: codecov/codecov-action@v2.1.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Gather dependencies
run: go mod download
- name: Run coverage
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4

0 comments on commit b60286b

Please sign in to comment.