Skip to content

Commit 04c5e3b

Browse files
fix(ci): docker memory management
1 parent b01733e commit 04c5e3b

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/run_tests.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ permissions:
2828

2929
jobs:
3030
determine-test-scope:
31-
runs-on: [ slurm-runner, 1xcpu ]
31+
runs-on: ubuntu-latest
3232
if: |
3333
github.event.pull_request.draft == false ||
3434
github.ref == 'refs/heads/develop' ||
@@ -119,27 +119,32 @@ jobs:
119119
needs: determine-test-scope
120120
if: ( needs.determine-test-scope.outputs.local_tests == 'true' ) || ( needs.determine-test-scope.outputs.remote_tests == 'true' )
121121
name: Run linting
122-
runs-on: [ slurm-runner, 1xcpu ]
123-
container: ghcr.io/astral-sh/uv:debian
122+
runs-on: ubuntu-latest
123+
container: ghcr.io/astral-sh/uv:debian
124124
steps:
125125
- uses: actions/checkout@v4
126126
with:
127127
fetch-depth: 1
128+
submodules: false
128129
- uses: astral-sh/ruff-action@v3
129130
with:
130131
version: 0.11.11
131132
- name: Run ruff format
132133
run: ruff format --check --diff
133134
- name: Run ruff check
134135
run: ruff check tidy3d
135-
136+
136137
local-tests:
137138
# Run on open PRs OR when manually triggered with local_tests=true
138139
needs: determine-test-scope
139140
if: needs.determine-test-scope.outputs.local_tests == 'true'
140141
name: Python ${{ matrix.python-version }} - self-hosted-runner
141142
runs-on: [ slurm-runner, 4xcpu ]
142-
container: ghcr.io/astral-sh/uv:debian
143+
container:
144+
image: ghcr.io/astral-sh/uv:debian
145+
options: --user 31001:61001 # Required slurm-batch UID: slurm GID for tmp/ file removal
146+
concurrency:
147+
group: local-tests-${{ github.ref }}
143148
strategy:
144149
matrix:
145150
python-version: ['3.9', '3.13']
@@ -153,7 +158,8 @@ jobs:
153158
steps:
154159
- uses: actions/checkout@v4
155160
with:
156-
fetch-depth: 0
161+
fetch-depth: 0 # Required 0 for diff report.
162+
submodules: false
157163

158164
- name: Install project
159165
env:
@@ -234,7 +240,7 @@ jobs:
234240
body:report,
235241
});
236242
}
237-
243+
238244
remote-tests:
239245
# Run tests on a push event OR a workflow dispatch with remote_tests
240246
needs: determine-test-scope
@@ -263,6 +269,7 @@ jobs:
263269
- uses: actions/checkout@v4
264270
with:
265271
fetch-depth: 1
272+
submodules: false
266273

267274
- name: Install Poetry
268275
uses: snok/install-poetry@v1
@@ -319,7 +326,7 @@ jobs:
319326
name: pr-requirements-pass
320327
if: ( needs.determine-test-scope.outputs.local_tests == 'true' ) || ( needs.determine-test-scope.outputs.remote_tests == 'true' )
321328
needs: [local-tests, remote-tests, lint]
322-
runs-on: [ slurm-runner, 1xcpu ]
329+
runs-on: ubuntu-latest
323330
steps:
324331
- name: check-passing-remote-tests
325332
run: |

.github/workflows/test_develop_cli.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
uses: actions/checkout@v4
2222
with:
2323
ref: develop
24-
24+
fetch-depth: 1
25+
submodules: false
2526

2627
- name: Set up Python
2728
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)