Browse Source

[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
commit
8fedc8766a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/doc_check_on_pr.yml
  2. 15
      .github/workflows/doc_test_on_pr.yml
  3. 2
      docs/README.md
  4. 2
      docs/conda-doc-test-deps.yml

4
.github/workflows/doc_check_on_pr.yml

@ -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

15
.github/workflows/doc_test_on_pr.yml

@ -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
@ -68,17 +71,21 @@ jobs:
- name: Checkout ColossalAI
uses: actions/checkout@v3
- 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: Install Doc Test Requirements
run: |
pip install -r docs/requirements-doc-test.txt
- 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

2
docs/README.md

@ -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

2
docs/conda-doc-test-deps.yml

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