[workflow] supported conda package installation in doc test (#3028)

* [workflow] supported conda package installation in doc test

* polish code

* polish code

* polish code

* polish code

* polish code

* polish code
pull/3014/head
Frank Lee 2 years ago committed by GitHub
parent 2cd6ba3098
commit 8fedc8766a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,10 +44,6 @@ jobs:
with:
python-version: '3.8.14'
- run: |
ls -la
ls -la ..
# we use the versions in the main branch as the guide for versions to display
# checkout will give your merged branch
# therefore, we need to make the merged branch as the main branch

@ -54,6 +54,9 @@ jobs:
image: hpcaitech/pytorch-cuda:1.12.0-11.3.0
options: --gpus all --rm
timeout-minutes: 20
defaults:
run:
shell: bash
steps:
- name: Checkout ColossalAI-Documentation
uses: actions/checkout@v2
@ -69,16 +72,20 @@ jobs:
- name: Checkout ColossalAI
uses: actions/checkout@v3
- name: Install ColossalAI
run: |
pip install -v .
- name: Install Doc Test Requirements
run: |
source activate pytorch
conda env update --file docs/conda-doc-test-deps.yml --prune
pip install -r docs/requirements-doc-test.txt
- name: Install ColossalAI
run: |
source activate pytorch
pip install -v .
- name: Test the Doc
run: |
source activate pytorch
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Testing $file now..."
docer test -p $file

@ -98,7 +98,7 @@ Lastly, if you want to skip some code, you just need to add the following annota
<!--- doc-test-ignore-end -->
```
If you have any dependency required, please add it to `requriements-doc-test.txt`.
If you have any dependency required, please add it to `requriements-doc-test.txt` for pip and `conda-doc-test-deps.yml` for conda.
### 💉 Auto Documentation

@ -0,0 +1,2 @@
dependencies:
- cmake
Loading…
Cancel
Save