Skip to content

Adding Sentry to mosha-author-service #61

Adding Sentry to mosha-author-service

Adding Sentry to mosha-author-service #61

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