-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (25 loc) · 961 Bytes
/
badge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Badge pipeline
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- main
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: vladopajic/go-test-coverage@v2
with:
config: ./.testcoverage.yml
git-branch: badges
git-token: ${{ github.ref_name == 'main' && secrets.ABTASTY_CLI_BADGE || '' }}