diff --git a/.github/workflows/ci-badger-tests-coverage.yml b/.github/workflows/ci-badger-tests-coverage.yml new file mode 100644 index 000000000..c5dccb3da --- /dev/null +++ b/.github/workflows/ci-badger-tests-coverage.yml @@ -0,0 +1,32 @@ +name: ci-badger-tests-coverage +on: + pull_request_target: + branches: + - main + - 'release/v*' +jobs: + badger-tests-coverage: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 # checkout merge commit + with: + ref: "refs/pull/${{ github.event.number }}/merge" + - name: Get Go Version + run: | + #!/bin/bash + GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) + echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: ${{ env.GOVERSION }} + - name: Install Dependencies + run: make dependency + - name: Run Badger Tests + run: make test + - name: Install Goveralls + run: go install github.com/mattn/goveralls@latest + - name: Send Coverage Results + env: + COVERALLS_TOKEN: ${{ secrets.COVERALLSIO_TOKEN }} + run: goveralls -coverprofile=cover.out diff --git a/.github/workflows/ci-badger-tests.yml b/.github/workflows/ci-badger-tests.yml index 9bf612ac4..cf698eca3 100644 --- a/.github/workflows/ci-badger-tests.yml +++ b/.github/workflows/ci-badger-tests.yml @@ -4,7 +4,7 @@ on: branches: - main - 'release/v*' - pull_request_target: + pull_request: branches: - main - 'release/v*' @@ -28,9 +28,3 @@ jobs: run: make dependency - name: Run Badger Tests run: make test - - name: Install Goveralls - run: go install github.com/mattn/goveralls@latest - - name: Send Coverage Results - env: - COVERALLS_TOKEN: ${{ secrets.COVERALLSIO_TOKEN }} - run: goveralls -coverprofile=cover.out