Skip to content

Commit

Permalink
Fix: codecov: use environ to pass CODECOV_TOKEN (ClusterLabs#1472)
Browse files Browse the repository at this point in the history
As shown in https://github.com/ClusterLabs/crmsh/actions/runs/9612091155/job/26512047071,
codecov reports: Error: Codecov token not found. Please provide Codecov token with -t flag.

So try a different way to provide the token.
  • Loading branch information
nicholasyang2022 committed Jun 25, 2024
1 parent fe4d011 commit 7dd695c
Showing 1 changed file with 52 additions and 26 deletions.
78 changes: 52 additions & 26 deletions .github/workflows/crmsh-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ jobs:
tox -v -e${{ matrix.python-version }}
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_crm_report_bugs:
runs-on: ubuntu-24.04
Expand All @@ -66,8 +67,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_crm_report_normal:
runs-on: ubuntu-24.04
Expand All @@ -82,8 +84,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_bootstrap_bugs:
runs-on: ubuntu-24.04
Expand All @@ -98,8 +101,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_bootstrap_bugs_non_root:
runs-on: ubuntu-24.04
Expand All @@ -114,8 +118,9 @@ jobs:
$DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_bootstrap_common:
runs-on: ubuntu-24.04
Expand All @@ -130,8 +135,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_bootstrap_common_non_root:
runs-on: ubuntu-24.04
Expand All @@ -146,8 +152,9 @@ jobs:
$DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_bootstrap_options:
runs-on: ubuntu-24.04
Expand All @@ -162,8 +169,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_corosync_ui:
runs-on: ubuntu-24.04
Expand All @@ -178,8 +186,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_bootstrap_options_non_root:
runs-on: ubuntu-24.04
Expand All @@ -194,8 +203,9 @@ jobs:
$DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_qdevice_setup_remove:
runs-on: ubuntu-24.04
Expand All @@ -210,8 +220,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_qdevice_setup_remove_non_root:
runs-on: ubuntu-24.04
Expand All @@ -226,8 +237,9 @@ jobs:
$DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_qdevice_options:
runs-on: ubuntu-24.04
Expand All @@ -242,8 +254,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_qdevice_validate:
runs-on: ubuntu-24.04
Expand All @@ -258,8 +271,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_qdevice_validate_non_root:
runs-on: ubuntu-24.04
Expand All @@ -274,8 +288,9 @@ jobs:
$DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_qdevice_user_case:
runs-on: ubuntu-24.04
Expand All @@ -290,8 +305,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_resource_failcount:
runs-on: ubuntu-24.04
Expand All @@ -306,8 +322,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_resource_set:
runs-on: ubuntu-24.04
Expand All @@ -322,8 +339,9 @@ jobs:
$DOCKER_SCRIPT $index
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_resource_set_non_root:
runs-on: ubuntu-24.04
Expand All @@ -338,8 +356,9 @@ jobs:
$DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_configure_sublevel:
runs-on: ubuntu-24.04
Expand All @@ -354,8 +373,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_constraints_bugs:
runs-on: ubuntu-24.04
Expand All @@ -370,8 +390,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_geo_cluster:
runs-on: ubuntu-24.04
Expand All @@ -386,8 +407,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_healthcheck:
runs-on: ubuntu-24.04
Expand All @@ -402,8 +424,9 @@ jobs:
$DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_cluster_api:
runs-on: ubuntu-24.04
Expand All @@ -417,8 +440,9 @@ jobs:
$DOCKER_SCRIPT `$GET_INDEX_OF cluster_api`
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_user_access:
runs-on: ubuntu-24.04
Expand All @@ -432,8 +456,9 @@ jobs:
$DOCKER_SCRIPT `$GET_INDEX_OF user_access`
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

functional_test_ssh_agent:
runs-on: ubuntu-24.04
Expand All @@ -447,8 +472,9 @@ jobs:
$DOCKER_SCRIPT `$GET_INDEX_OF ssh_agent` && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT -u `$GET_INDEX_OF ssh_agent`
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

original_regression_test:
runs-on: ubuntu-24.04
Expand Down

0 comments on commit 7dd695c

Please sign in to comment.