Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nikandfor committed Nov 12, 2023
1 parent aeb6eca commit 19e5c1f
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,41 @@ on:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
test:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
go-ver: ["1.21", "1.20", "1.19"]
include:
- os: "ubuntu-latest"
go-ver: "1.21"
cover: true

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-ver }}

- run: pwd

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

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Test with Cover
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
if: ${{ matrix.cover }}

- name: Build
run: go build -v ./...
- name: Test without Cover
run: go test -v ./...
if: ${{ !matrix.cover }}

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

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
if: ${{ matrix.cover }}

0 comments on commit 19e5c1f

Please sign in to comment.