Skip to content

Commit

Permalink
Codecov: remove token, turn off CI failure (#341)
Browse files Browse the repository at this point in the history
* Codecov: remove token, turn off CI failure

See also: netobserv/network-observability-console-plugin#531

Also, align the workflow file with other repos

* Add codecov on push / align with other repos workflows
  • Loading branch information
jotak authored May 28, 2024
1 parent 0fe7a3d commit 2fab629
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Pull request checks

on:
push:
branches: [ 'main', 'release-*' ]
pull_request:
branches: [ 'main', 'release-*' ]
branches: [ '*' ]

jobs:
test:
Expand All @@ -30,10 +28,8 @@ jobs:
- name: Report coverage
if: ${{ matrix.go == '1.21' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./cover.out
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: false
verbose: true
27 changes: 27 additions & 0 deletions .github/workflows/push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,30 @@ jobs:
run: |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} VERSION=${{ env.WF_VERSION }} make images
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} VERSION=${{ env.short_sha }} OCI_BUILD_OPTS="--label quay.expires-after=2w" make images
codecov:
name: Codecov upload
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.21']
steps:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v3
- name: Test
run: make test
- name: Report coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./cover.out
flags: unittests
fail_ci_if_error: true
verbose: true

0 comments on commit 2fab629

Please sign in to comment.