update unit testing CI rules

pull/394/head
FrankLeeeee 2022-03-03 07:42:46 +00:00 committed by Frank Lee
parent bbbfe9b2c9
commit dfc3fafe89
8 changed files with 66 additions and 59 deletions

View File

@ -1,51 +0,0 @@
name: Pull Request CI and Build
on: pull_request
jobs:
cancel_previous_workflow:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && (github.base_ref == 'main' || github.base_ref == 'develop') && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
assign_reviewer:
name: Assign Reviewer for PR
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && (github.base_ref == 'main' || github.base_ref == 'develop') && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' && toJson(github.event.pull_request.requested_reviewers) == '[]'
steps:
- uses: kentaro-m/auto-assign-action@v1.2.1
with:
configuration-path: '.github/reviewer_list.yml'
build:
name: Build and Test Colossal-AI
if: ${{ always() }} && github.event.pull_request.draft == false && (github.base_ref == 'main' || github.base_ref == 'develop') && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
needs: [cancel_previous_workflow, assign_reviewer]
runs-on: [self-hosted, gpu]
container:
image: nvcr.io/nvidia/pytorch:21.07-py3
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
timeout-minutes: 20
steps:
- name: Setup Environment
run: |
export https_proxy=http://172.17.0.1:7890 http_proxy=http://172.17.0.1:7890 all_proxy=socks5://172.17.0.1:7890
- name: Install dependencies
run: |
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U pip setuptools wheel --user
pip install pytest tensorboard deepspeed apex
- uses: actions/checkout@v2
- name: Install Colossal-AI
run: |
pip install -r requirements/requirements.txt
pip install -v --no-cache-dir .
- name: Unit Testing
run: |
pytest tests
env:
DATA: /data/scratch/cifar-10

19
.github/workflows/assign_reviewer.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Assign Reviewers for Team
on:
pull_request:
types: [opened]
jobs:
assign_reviewer:
name: Assign Reviewer for PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft == false &&
(github.base_ref == 'main' || github.base_ref == 'develop')
&& github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
&& toJson(github.event.pull_request.requested_reviewers) == '[]'
steps:
- uses: kentaro-m/auto-assign-action@v1.2.1
with:
configuration-path: '.github/reviewer_list.yml'

38
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Build
on:
pull_request:
types: [synchronize, labeled]
jobs:
build:
name: Build and Test Colossal-AI
if: |
github.event.pull_request.draft == false &&
(github.base_ref == 'main' || github.base_ref == 'develop') &&
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' &&
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
runs-on: [self-hosted, gpu]
container:
image: nvcr.io/nvidia/pytorch:21.07-py3
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
timeout-minutes: 20
steps:
- name: Setup Environment
run: |
export https_proxy=http://172.17.0.1:7890 http_proxy=http://172.17.0.1:7890 all_proxy=socks5://172.17.0.1:7890
- name: Install dependencies
run: |
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U pip setuptools wheel --user
pip install pytest tensorboard deepspeed apex
- uses: actions/checkout@v2
- name: Install Colossal-AI
run: |
pip install -r requirements/requirements.txt
pip install -v --no-cache-dir .
- name: Unit Testing
run: |
pytest tests
env:
DATA: /data/scratch/cifar-10

View File

@ -1,4 +1,5 @@
name: Close inactive issues
on:
schedule:
- cron: "0 0 * * *"

View File

@ -1,15 +1,12 @@
name: Compatibility Test
# set to pull_request for testing purpose
# will change to workflow_dispatch when PR to develop
on: pull_request
on: workflow_dispatch
jobs:
build:
name: Test for PyTorch compatibility
# comment for now, will uncomment when PR to develop
# if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI'
runs-on: [self-hosted, gpu]
if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI'
runs-on: [self-hosted, aws]
strategy:
fail-fast: false
matrix:
@ -24,7 +21,7 @@ jobs:
container:
image: ${{ matrix.container }}
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
timeout-minutes: 180
timeout-minutes: 120
steps:
- name: Setup Environment
run: |

View File

@ -1,4 +1,5 @@
name: Publish to PyPI
on: workflow_dispatch
jobs:

View File

@ -1,4 +1,5 @@
name: Synchronize Submodule
on:
workflow_dispatch:
schedule:
@ -12,6 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'develop'
submodules: true
- name: echo

View File

@ -218,7 +218,7 @@ setup(
extras_require={
'zero': fetch_requirements('requirements/requirements-zero.txt'),
},
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: Apache Software License',