Skip to content

Commit

Permalink
rebased test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyabrin committed Oct 21, 2024
1 parent 3fad736 commit fa06170
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,22 @@

name: Tests

on: [push, pull_request]

permissions:
contents: read

name: Run Tests
jobs:
test:
strategy:
matrix:
go-version: ["1.18.x", "1.19.x", "1.20.x", "1.21.x", "1.22.x"]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
run: go test -v -covermode=count

coverage:
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: 1.18.x
- name: Checkout code
uses: actions/checkout@v4
- name: Calc coverage
go-version-file: go.mod
- name: Run tests with coverage
run: |
go test -v -covermode=count -coverprofile=coverage.out
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/[email protected]
- name: Coveralls
uses: coverallsapp/[email protected].0
uses: coverallsapp/[email protected].3
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
file: coverage.out
format: golang

0 comments on commit fa06170

Please sign in to comment.