Revise/test #2
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: Tests Data service | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'data-management-service/**' | |
workflow_dispatch: | |
jobs: | |
test-data-service: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.x' | |
- name: Download dependencies | |
run: cd data-management-service && go mod download && go mod vendor | |
- name: Unit test & integration test | |
run: cd data-management-service && go test -v -coverprofile=coverage.txt ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.txt | |
flags: data-service | |
name: codecov-umbrella | |
fail_ci_if_error: true |