From 339d918734b85060bbc167aa0ba7e33651aa9c1b Mon Sep 17 00:00:00 2001 From: Eugen Betke Date: Wed, 24 Jul 2024 10:50:39 +0200 Subject: [PATCH] Use GitHub token to access regression tests --- .github/ci-nightly-test.sh | 17 ++++++++++++----- .github/workflows/reusable-ci-hpc.yml | 6 +++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/ci-nightly-test.sh b/.github/ci-nightly-test.sh index f83f9ad06..4bf7c14ce 100644 --- a/.github/ci-nightly-test.sh +++ b/.github/ci-nightly-test.sh @@ -14,12 +14,19 @@ module load python3 version=$(cat $TMPDIR/eccodes/VERSION) -# regression_suite_dir=$TMPDIR/eccodes-regression-tests -# mkdir -p $regression_suite_dir -# git clone git@github.com:ecmwf/eccodes-regression-tests.git $regression_suite_dir -# cd $regression_suite_dir +env_check_param="$1" +echo env_check: $env_check_param +echo ENV_CHECK: $ENV_CHECK -cd ~masn/REGRESSION_TESTING/ecCodes +regression_suite_dir=$TMPDIR/eccodes-regression-tests +mkdir -p $regression_suite_dir +git clone https://oauth2:${GH_TOKEN}@github.com/ecmwf/eccodes-regression-tests.git $regression_suite_dir +#git clone https://${GH_TOKEN}:@github.com/ecmwf/eccodes-regression-tests.git $regression_suite_dir +#git clone https://${GH_TOKEN}:x-oauth-basic@github.com/ecmwf/eccodes-regression-tests.git $regression_suite_dir +#git clone https://${GH_TOKEN}@github.com/ecmwf/eccodes-regression-tests.git $regression_suite_dir +cd $regression_suite_dir + +#cd ~masn/REGRESSION_TESTING/ecCodes ./par-suite.sh -w $TMPDIR/install/eccodes/$version # For debugging specific test(s) diff --git a/.github/workflows/reusable-ci-hpc.yml b/.github/workflows/reusable-ci-hpc.yml index 1176afc9d..118738153 100644 --- a/.github/workflows/reusable-ci-hpc.yml +++ b/.github/workflows/reusable-ci-hpc.yml @@ -11,6 +11,10 @@ on: type: boolean default: false +env: + GH_TOKEN: ${{ secrets.GH_REPO_READ_TOKEN }} + ENV_CHECK: 'SUCCESS' + jobs: ci-hpc: name: ci-hpc @@ -28,6 +32,6 @@ jobs: --cmake-options: | -DENABLE_EXTRA_TESTS=1 ${{ inputs.nightly_test && '-DENABLE_PNG=1,-DENABLE_NETCDF=1' || '' }} - ${{ inputs.nightly_test && '--post-script: .github/ci-nightly-test.sh' || '' }} + ${{ inputs.nightly_test && '--post-script: .github/ci-nightly-test.sh ${ENV_CHECK}' || '' }} ${{ inputs.nightly_test && '--force-build: true' || '' }} secrets: inherit