Skip to content

Commit

Permalink
ci: run steps releasing and publishing coverage only on 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeodor committed May 6, 2024
1 parent 3c4886f commit 7089ff2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- run: coverage run -m pytest -vv ./python/tests/
- run: coverage report | grep 'TOTAL' | awk '{print "COVERAGE_PCT=" $4}' >> $GITHUB_ENV
- name: Publish SDK test coverage
if: github.ref == 'refs/heads/main'
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_ACCESS_TOKEN }}
Expand Down Expand Up @@ -136,6 +137,8 @@ jobs:
test-cli:
name: Unit test CLI
runs-on: ubuntu-latest
if:

steps:
- uses: actions/checkout@v4
- name: Setup Go
Expand All @@ -150,6 +153,7 @@ jobs:
working-directory: cli
run: go tool cover -func c.out | fgrep total | awk '{print "COVERAGE_PCT=" $3}' >> $GITHUB_ENV
- name: Publish Test Coverage
if: github.ref == 'refs/heads/main'
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_ACCESS_TOKEN }}
Expand All @@ -161,6 +165,7 @@ jobs:
maxColorRange: 80
valColorRange: ${{ env.COVERAGE_PCT }}
release:
if: github.ref == 'refs/heads/main'
timeout-minutes: 15
runs-on: ubuntu-latest
name: Release
Expand Down

0 comments on commit 7089ff2

Please sign in to comment.