Skip to content

Commit 747517c

Browse files
author
zihugithub
committed
ci: update Ascend volume paths and re-enable unit tests
1 parent cbf4723 commit 747517c

4 files changed

Lines changed: 37 additions & 35 deletions

File tree

.github/configs/ascend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ runner_labels: ["flagscale-ascend-ascend910-gpu2-32c-128g"]
1515

1616
# Container volumes (hardware-specific paths)
1717
container_volumes:
18-
- /public/cicd/baai_datasets:/home/gitlab-runner/data
19-
- /public/cicd/baai_tokenizers:/home/gitlab-runner/tokenizers
18+
- /public-ks3/cicd/baai_datasets:/home/gitlab-runner/data
19+
- /public-ks3/cicd/baai_tokenizers:/home/gitlab-runner/tokenizers
2020
- /usr/local/Ascend/driver:/usr/local/Ascend/driver:ro
2121
- /usr/local/Ascend/add-ons:/usr/local/Ascend/add-ons:ro
2222
- /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi:ro

.github/workflows/all_tests_common.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -154,34 +154,34 @@ jobs:
154154
env_name: ${{ needs.checkout_and_config.outputs.env_name_train }}
155155
env_path: ${{ needs.checkout_and_config.outputs.env_path }}
156156

157-
# unit_tests:
158-
# needs:
159-
# - checkout_and_config
160-
# - cli_validation
161-
# if: fromJson(needs.checkout_and_config.outputs.device_types)[0] != null
162-
# strategy:
163-
# fail-fast: false
164-
# matrix:
165-
# device: ${{ fromJson(needs.checkout_and_config.outputs.device_types) }}
166-
# uses: ./.github/workflows/unit_tests_common.yml
167-
# name: unit_tests
168-
# with:
169-
# platform: ${{ inputs.platform }}
170-
# device: ${{ matrix.device }}
171-
# image: ${{ needs.checkout_and_config.outputs.ci_train_image }}
172-
# runs_on: ${{ needs.checkout_and_config.outputs.runs_on }}
173-
# container_volumes: ${{ needs.checkout_and_config.outputs.container_volumes }}
174-
# container_options: ${{ needs.checkout_and_config.outputs.container_options }}
175-
# source_artifact: flagscale-source-${{ github.sha }}
176-
# pkg_mgr: ${{ needs.checkout_and_config.outputs.pkg_mgr }}
177-
# env_name: ${{ needs.checkout_and_config.outputs.env_name_train }}
178-
# env_path: ${{ needs.checkout_and_config.outputs.env_path }}
157+
unit_tests:
158+
needs:
159+
- checkout_and_config
160+
- cli_validation
161+
if: fromJson(needs.checkout_and_config.outputs.device_types)[0] != null
162+
strategy:
163+
fail-fast: false
164+
matrix:
165+
device: ${{ fromJson(needs.checkout_and_config.outputs.device_types) }}
166+
uses: ./.github/workflows/unit_tests_common.yml
167+
name: unit_tests
168+
with:
169+
platform: ${{ inputs.platform }}
170+
device: ${{ matrix.device }}
171+
image: ${{ needs.checkout_and_config.outputs.ci_train_image }}
172+
runs_on: ${{ needs.checkout_and_config.outputs.runs_on }}
173+
container_volumes: ${{ needs.checkout_and_config.outputs.container_volumes }}
174+
container_options: ${{ needs.checkout_and_config.outputs.container_options }}
175+
source_artifact: flagscale-source-${{ github.sha }}
176+
pkg_mgr: ${{ needs.checkout_and_config.outputs.pkg_mgr }}
177+
env_name: ${{ needs.checkout_and_config.outputs.env_name_train }}
178+
env_path: ${{ needs.checkout_and_config.outputs.env_path }}
179179

180180
functional_tests_train:
181181
needs:
182182
- checkout_and_config
183183
- cli_validation
184-
# - unit_tests
184+
- unit_tests
185185
if: fromJson(needs.checkout_and_config.outputs.train_test_matrix)[0] != null
186186
uses: ./.github/workflows/functional_tests_train.yml
187187
with:
@@ -200,7 +200,7 @@ jobs:
200200
needs:
201201
- checkout_and_config
202202
- cli_validation
203-
# - unit_tests
203+
- unit_tests
204204
if: fromJson(needs.checkout_and_config.outputs.hetero_train_test_matrix)[0] != null
205205
uses: ./.github/workflows/functional_tests_hetero_train.yml
206206
with:
@@ -219,7 +219,7 @@ jobs:
219219
needs:
220220
- checkout_and_config
221221
- cli_validation
222-
# - unit_tests
222+
- unit_tests
223223
if: fromJson(needs.checkout_and_config.outputs.inference_test_matrix)[0] != null
224224
uses: ./.github/workflows/functional_tests_inference.yml
225225
with:
@@ -238,7 +238,7 @@ jobs:
238238
needs:
239239
- checkout_and_config
240240
- cli_validation
241-
# - unit_tests
241+
- unit_tests
242242
if: fromJson(needs.checkout_and_config.outputs.serve_test_matrix)[0] != null
243243
uses: ./.github/workflows/functional_tests_serve.yml
244244
with:
@@ -276,7 +276,7 @@ jobs:
276276
needs:
277277
- checkout_and_config
278278
- cli_validation
279-
# - unit_tests
279+
- unit_tests
280280
if: fromJson(needs.checkout_and_config.outputs.benchmark_test_matrix)[0] != null
281281
uses: ./.github/workflows/functional_tests_benchmark.yml
282282
with:
@@ -298,7 +298,7 @@ jobs:
298298
needs:
299299
- checkout_and_config
300300
- cli_validation
301-
# - unit_tests
301+
- unit_tests
302302
- functional_tests_train
303303
- functional_tests_hetero_train
304304
- functional_tests_benchmark
@@ -314,11 +314,11 @@ jobs:
314314
# Check all test jobs (skip if not run)
315315
failed=false
316316
317-
# if [ "${{ needs.unit_tests.result }}" != "success" ] && \
318-
# [ "${{ needs.unit_tests.result }}" != "skipped" ]; then
319-
# echo "❌ Unit tests failed"
320-
# failed=true
321-
# fi
317+
if [ "${{ needs.unit_tests.result }}" != "success" ] && \
318+
[ "${{ needs.unit_tests.result }}" != "skipped" ]; then
319+
echo "❌ Unit tests failed"
320+
failed=true
321+
fi
322322
323323
if [ "${{ needs.cli_validation.result }}" != "success" ] && \
324324
[ "${{ needs.cli_validation.result }}" != "skipped" ]; then

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file makes tests/ a Python package

tests/unit_tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file makes tests/unit_tests/ a Python package

0 commit comments

Comments
 (0)