diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d4c6dc..d2e12b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,9 @@ name: Run tests on: workflow_call: + secrets: + CODECOV_TOKEN: + required: true jobs: test: @@ -90,7 +93,12 @@ jobs: export ISPYB_CREDENTIALS="./conf/config.cfg" PYTHONDEVMODE=1 pytest tests -ra --cov=ispyb --cov-report=xml --cov-branch - - name: Publish coverage stats - run: bash <(curl -s https://codecov.io/bash) -n "Python ${{ matrix.python-version }}" + - name: Upload to Codecov + uses: codecov/codecov-action@v4 + with: + name: ${{ matrix.python-version }} + files: coverage.xml + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} continue-on-error: true timeout-minutes: 2 diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index 04f2636..5cb8115 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -65,6 +65,8 @@ jobs: needs: - build - static + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} get-env-vars: name: Get environment variables