Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuoza committed Nov 2, 2021
1 parent 5b2ec61 commit 9731262
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: test
on:
pull_request_target:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.17, 1.16, 1.15]
name: Test with Go version ${{ matrix.go }}
steps:
- uses: actions/setup-go@v2.1.3
with:
go-version: ${{ matrix.go }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Get dependencies
run: go mod download

- name: go vet
run: go vet ./...

- name: go test
run: go test -v -covermode=count -coverprofile=coverage.out

- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.8
with:
infile: coverage.out
outfile: coverage.lcov
- name: Coveralls Parallel
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
flag-name: go-version-${{ matrix.go }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: test
on:
push:
branches:
- '*'
- '!dependabot/**'
tags-ignore:
- '*'
pull_request_target:

jobs:
test:
Expand Down

0 comments on commit 9731262

Please sign in to comment.