File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: Reusable Pull Request CI tests for modules
22
33on :
44 workflow_call :
5+ secrets :
6+ CDSAPI_KEY :
7+ required : false
58
69jobs :
710 build :
@@ -12,22 +15,10 @@ jobs:
1215 matrix :
1316 os : [ubuntu-latest, windows-latest, macos-latest]
1417 python-version : ["3.12"]
18+ env :
19+ CDSAPI_KEY : ${{ secrets.CDSAPI_KEY }}
1520 steps :
1621 - uses : actions/checkout@v4
17- - name : Conditionally set up .cdsapirc
18- shell : bash
19- run : |
20- if [ -n "${{ secrets.CDSAPI_KEY }}" ]; then
21- if [[ "$RUNNER_OS" == "Windows" ]]; then
22- cdsapirc_path="$USERPROFILE/.cdsapirc"
23- else
24- cdsapirc_path="$HOME/.cdsapirc"
25- fi
26- echo "url = https://cds.climate.copernicus.eu/api" >> "$cdsapirc_path"
27- echo "key = ${{ secrets.CDSAPI_KEY }}" >> "$cdsapirc_path"
28- else
29- echo "CDSAPI_KEY secret is empty or not set. Skipping .cdsapirc setup."
30- fi
3122 - name : Setup pixi
3223 uses : prefix-dev/setup-pixi@v0.8.3
3324 - name : Run integration tests
You can’t perform that action at this time.
0 commit comments