-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
bjankulovski
committed
Jun 5, 2022
1 parent
a5eea34
commit a2d83b4
Showing
1 changed file
with
42 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
# This workflow will run test and upload the coverage when push or pull_request is made on `dev` branch | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
|
||
- name: Checkout the code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
- name: Run Test and get coverage | ||
run: | | ||
go test -race -covermode atomic -coverprofile=covprofile | ||
sed -i "s/$(pwd|sed 's/\//\\\//g')/./g" covprofile # convert absolute path to relative path | ||
- name: Push test coverage | ||
if: success() | ||
continue-on-error: true | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: covprofile | ||
|
||
# This workflow will run test and upload the coverage when push or pull_request is made on `dev` branch | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
|
||
- name: Checkout the code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
- name: Run Test and get coverage | ||
run: | | ||
go test -race -covermode atomic -coverprofile=covprofile | ||
sed -i "s/$(pwd|sed 's/\//\\\//g')/./g" covprofile # convert absolute path to relative path | ||
- name: Push test coverage | ||
if: success() | ||
continue-on-error: true | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: covprofile | ||
|