mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-01 09:07:51 +00:00
[test] refactor tests with spawn (#3452)
* [test] added spawn decorator * polish code * polish code * polish code * polish code * polish code * polish code
This commit is contained in:
19
.github/workflows/build_on_pr.yml
vendored
19
.github/workflows/build_on_pr.yml
vendored
@@ -8,10 +8,10 @@ jobs:
|
||||
detect:
|
||||
name: Detect file change
|
||||
if: |
|
||||
github.event.pull_request.draft == false &&
|
||||
github.base_ref == 'main' &&
|
||||
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' &&
|
||||
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
|
||||
github.event.pull_request.draft == false &&
|
||||
github.base_ref == 'main' &&
|
||||
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' &&
|
||||
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
|
||||
outputs:
|
||||
changedExtenisonFiles: ${{ steps.find-extension-change.outputs.all_changed_files }}
|
||||
anyExtensionFileChanged: ${{ steps.find-extension-change.outputs.any_changed }}
|
||||
@@ -27,10 +27,10 @@ jobs:
|
||||
- name: Locate base commit
|
||||
id: locate-base-sha
|
||||
run: |
|
||||
curBranch=$(git rev-parse --abbrev-ref HEAD)
|
||||
commonCommit=$(git merge-base origin/main $curBranch)
|
||||
echo $commonCommit
|
||||
echo "baseSHA=$commonCommit" >> $GITHUB_OUTPUT
|
||||
curBranch=$(git rev-parse --abbrev-ref HEAD)
|
||||
commonCommit=$(git merge-base origin/main $curBranch)
|
||||
echo $commonCommit
|
||||
echo "baseSHA=$commonCommit" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Find the changed extension-related files
|
||||
id: find-extension-change
|
||||
@@ -63,7 +63,6 @@ jobs:
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
|
||||
build:
|
||||
name: Build and Test Colossal-AI
|
||||
needs: detect
|
||||
@@ -124,7 +123,7 @@ jobs:
|
||||
- name: Execute Unit Testing
|
||||
if: needs.detect.outputs.anyLibraryFileChanged == 'true'
|
||||
run: |
|
||||
PYTHONPATH=$PWD pytest --cov=. --cov-report xml tests/
|
||||
CURL_CA_BUNDLE="" PYTHONPATH=$PWD pytest --cov=. --cov-report xml tests/
|
||||
env:
|
||||
DATA: /data/scratch/cifar-10
|
||||
NCCL_SHM_DISABLE: 1
|
||||
|
Reference in New Issue
Block a user