fix test ci #5
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: CI pipeline | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
workflow_call: | |
jobs: | |
build: | |
name: Test & Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Run tests | |
run: go test -race `go list ./... | grep -v cmd/feature_experimentation/analyze | grep -v cmd/feature_experimentation/resource` -coverprofile cover.out.tmp | |
- name: Removes mocks from tests | |
run: cat cover.out.tmp | grep -v "mock_\|cmd/feature_experimentation/analyze" | grep -v "mock_\|cmd/feature_experimentation/resource" > cover.out | |
- uses: codecov/codecov-action@v2 | |
with: | |
file: ./cover.out | |
- uses: vladopajic/go-test-coverage@v2 | |
with: | |
profile: ./cover.out | |
local-prefix: github.com/flagship-io/abtasty-cli | |
threshold-total: 70 |