Skip to content

Commit 63ff689

Browse files
committed
notebook test fixes
1 parent 92e63d9 commit 63ff689

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/notebook-test.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ on: [push, pull_request]
55
jobs:
66
test:
77
runs-on: ubuntu-latest
8-
env:
9-
# Conditionally set thread limits only for Gitea runners to prevent resource exhaustion.
10-
# These are set to '1' if the IS_GITEA var is true, otherwise they are empty and have no effect.
11-
OMP_NUM_THREADS: ${{ vars.IS_GITEA == 'true' && '1' || '' }}
12-
MKL_NUM_THREADS: ${{ vars.IS_GITEA == 'true' && '1' || '' }}
13-
OPENBLAS_NUM_THREADS: ${{ vars.IS_GITEA == 'true' && '1' || '' }}
14-
VECLIB_MAXIMUM_THREADS: ${{ vars.IS_GITEA == 'true' && '1' || '' }}
15-
NUMEXPR_NUM_THREADS: ${{ vars.IS_GITEA == 'true' && '1' || '' }}
16-
DEBIAN_FRONTEND: noninteractive
178

189
steps:
1910
- name: Check out repository
2011
uses: actions/checkout@v4
2112

13+
- name: Set environment variables
14+
run: |
15+
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
16+
if [[ "${{ vars.IS_GITEA }}" == "true" ]]; then
17+
echo "Setting thread limits for Gitea runner"
18+
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
19+
echo "MKL_NUM_THREADS=1" >> $GITHUB_ENV
20+
echo "OPENBLAS_NUM_THREADS=1" >> $GITHUB_ENV
21+
echo "VECLIB_MAXIMUM_THREADS=1" >> $GITHUB_ENV
22+
echo "NUMEXPR_NUM_THREADS=1" >> $GITHUB_ENV
23+
fi
24+
2225
- name: Install Act dependencies
2326
if: ${{ env.ACT }}
2427
run: |
@@ -90,6 +93,11 @@ jobs:
9093
which python
9194
python --version
9295
96+
- name: Prepare test configuration file
97+
run: |
98+
echo "Copying config_single_run.yml to notebooks/ directory for test..."
99+
cp config_single_run.yml notebooks/
100+
93101
- name: Run tests
94102
run: |
95103
set -e

0 commit comments

Comments
 (0)