From 6070dfa714f3fdf5d56952eb9fc131f1dd501183 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 18 Dec 2024 12:35:58 -0300 Subject: [PATCH 1/4] fix: more token --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e13158c..88c6f71a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ on: [push, pull_request] jobs: run: runs-on: ubuntu-latest + permissions: + id-token: write steps: - name: Checkout uses: actions/checkout@v4 @@ -14,9 +16,23 @@ jobs: run: pip install -r requirements.txt - name: Run tests and collect coverage run: pytest --cov app - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 + - name: Upload coverage to Codecov (arg token) + uses: codecov/codecov-action@main + with: + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov (env token) + uses: codecov/codecov-action@main with: verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov (no token) + uses: codecov/codecov-action@main + with: + verbose: true + - name: Upload coverage to Codecov (oidc) + uses: codecov/codecov-action@main + with: + verbose: true + use_oidc: true From 42be75cc93252efa005345f2eb999b904e5afabe Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 18 Dec 2024 12:37:32 -0300 Subject: [PATCH 2/4] fix: fail ci if error --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88c6f71a..15abf468 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,20 +19,24 @@ jobs: - name: Upload coverage to Codecov (arg token) uses: codecov/codecov-action@main with: - verbose: true + fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + verbose: true - name: Upload coverage to Codecov (env token) uses: codecov/codecov-action@main with: + fail_ci_if_error: true verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage to Codecov (no token) uses: codecov/codecov-action@main with: + fail_ci_if_error: true verbose: true - name: Upload coverage to Codecov (oidc) uses: codecov/codecov-action@main with: - verbose: true + fail_ci_if_error: true use_oidc: true + verbose: true From 42da616fd32930926299941cece9844f2f6ea67b Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 18 Dec 2024 15:13:49 -0300 Subject: [PATCH 3/4] fix: test branch --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15abf468..dd6fe958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,25 +17,25 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov (arg token) - uses: codecov/codecov-action@main + uses: codecov/codecov-action@th/bump-scripts-and-logging with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} verbose: true - name: Upload coverage to Codecov (env token) - uses: codecov/codecov-action@main + uses: codecov/codecov-action@th/bump-scripts-and-logging with: fail_ci_if_error: true verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage to Codecov (no token) - uses: codecov/codecov-action@main + uses: codecov/codecov-action@th/bump-scripts-and-logging with: fail_ci_if_error: true verbose: true - name: Upload coverage to Codecov (oidc) - uses: codecov/codecov-action@main + uses: codecov/codecov-action@th/bump-scripts-and-logging with: fail_ci_if_error: true use_oidc: true From e26253fb7a2e215686ea7a70b9d7c454fd796cd6 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 18 Dec 2024 15:19:40 -0300 Subject: [PATCH 4/4] fix: set back to main --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd6fe958..15abf468 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,25 +17,25 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov (arg token) - uses: codecov/codecov-action@th/bump-scripts-and-logging + uses: codecov/codecov-action@main with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} verbose: true - name: Upload coverage to Codecov (env token) - uses: codecov/codecov-action@th/bump-scripts-and-logging + uses: codecov/codecov-action@main with: fail_ci_if_error: true verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage to Codecov (no token) - uses: codecov/codecov-action@th/bump-scripts-and-logging + uses: codecov/codecov-action@main with: fail_ci_if_error: true verbose: true - name: Upload coverage to Codecov (oidc) - uses: codecov/codecov-action@th/bump-scripts-and-logging + uses: codecov/codecov-action@main with: fail_ci_if_error: true use_oidc: true