Merge pull request #24 from wcodesoft/feature/add-sentry #62
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
name: Test Buso Golang library | |
on: | |
push: | |
branches: | |
- '**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
jobs: | |
unit_test_service: | |
runs-on: ubuntu-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo and setup Java | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' # The Go version to download (if necessary) and use. | |
- name: Initialize Golang environment | |
run: go mod tidy | |
#---------------------------------------------- | |
# Run unit tests for the library | |
#---------------------------------------------- | |
- name: Run unit tests on the Golang library | |
run: go test -coverprofile=cover.out -v ./... | |
#---------------------------------------------- | |
# Send test coverage to Codacy | |
#---------------------------------------------- | |
- name: Report test-coverage to Codacy | |
run: | | |
# Install the CLI | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ | |
--force-coverage-parser go -r ./cover.out |