From 782127334615ed5d07573fb67f6a2a4a9d096316 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Sun, 22 Oct 2023 13:52:54 -0400 Subject: [PATCH 1/4] Re-enable FOSSA scan and add CODECOV Signed-off-by: Matt Lord --- .github/workflows/static_checks_etc.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 34714d00256..e9d423eabcb 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -33,6 +33,12 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@v3 + - name: Run FOSSA scan and upload build data + if: steps.skip-workflow.outputs.skip-workflow == 'false' + uses: fossa-contrib/fossa-action@v2 + with: + fossa-api-key: ${{secrets.fossaApiKey}} + - name: Check for changes in Go files if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: frouioui/paths-filter@main @@ -214,3 +220,10 @@ jobs: echo "$output" echo "" exit 1 + + - name: Upload coverage reports to Codecov + timeout-minutes: 30 + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + From c661af585c17f5462705972e0e6d1db5c354a8ce Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Sun, 22 Oct 2023 13:56:57 -0400 Subject: [PATCH 2/4] Add codecov badge Signed-off-by: Matt Lord --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6f021141aca..c5bdb88d2ab 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.vitess/vitess-jdbc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.vitess/vitess-jdbc) [![codebeat badge](https://codebeat.co/badges/51c9a056-1103-4522-9a9c-dc623821ea87)](https://codebeat.co/projects/github-com-youtube-vitess) +[![Coverage Status](https://codecov.io/gh/vitessio/vitess/branch/main/graph/badge.svg)](https://codecov.io/gh/vitessio/vitess) [![Go Report Card](https://goreportcard.com/badge/vitess.io/vitess)](https://goreportcard.com/report/vitess.io/vitess) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fvitessio%2Fvitess.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fvitessio%2Fvitess?ref=badge_shield) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1724/badge)](https://bestpractices.coreinfrastructure.org/projects/1724) From ca8d73a0c18f776b67232719742e1d6c6896a235 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Sun, 22 Oct 2023 14:12:25 -0400 Subject: [PATCH 3/4] Only run both on merges to main Signed-off-by: Matt Lord --- .github/workflows/static_checks_etc.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index e9d423eabcb..f4690c7d55f 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v3 - name: Run FOSSA scan and upload build data - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: github.ref == 'refs/heads/main' uses: fossa-contrib/fossa-action@v2 with: fossa-api-key: ${{secrets.fossaApiKey}} @@ -222,6 +222,7 @@ jobs: exit 1 - name: Upload coverage reports to Codecov + if: github.ref == 'refs/heads/main' timeout-minutes: 30 uses: codecov/codecov-action@v3 env: From c9680fc0c1e4aa015e3bd50e2a6d9df0f26516da Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Sun, 22 Oct 2023 14:32:50 -0400 Subject: [PATCH 4/4] Run codecov on pull_request too --- .github/workflows/static_checks_etc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index f4690c7d55f..d90a93ea6ad 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -222,7 +222,6 @@ jobs: exit 1 - name: Upload coverage reports to Codecov - if: github.ref == 'refs/heads/main' timeout-minutes: 30 uses: codecov/codecov-action@v3 env: