-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ocefpaf/update_docs
update GHA in the docs
- Loading branch information
Showing
1 changed file
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,7 +251,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
fail-fast: false | ||
|
||
|
@@ -260,22 +260,25 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@main | ||
- name: Setup Micromamba ${{ matrix.python-version }} | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: false | ||
|
||
- name: Python ${{ matrix.python-version }} | ||
environment-name: TEST | ||
init-shell: bash | ||
create-args: >- | ||
python=${{ matrix.python-version }} pip | ||
--file requirements.txt | ||
--file requirements-dev.txt | ||
--channel conda-forge | ||
- name: Install package | ||
shell: bash -l {0} | ||
run: | | ||
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge | ||
micromamba activate TEST | ||
python -m pip install -e . --no-deps --force-reinstall | ||
- name: Tests | ||
shell: bash -l {0} | ||
run: | | ||
micromamba activate TEST | ||
python -m pytest -n 2 -rxs --cov=ioos_pkg_skeleton tests | ||
``` | ||
|
@@ -435,11 +438,16 @@ jobs: | |
## gh-pages documentation auto publishing with GitHub Actions | ||
```yaml | ||
name: Build and Deploy docs | ||
name: Documentation | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build-docs: | ||
|
@@ -451,35 +459,35 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Mamba | ||
uses: mamba-org/provision-with-micromamba@main | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: false | ||
|
||
- name: Build environment | ||
environment-name: TEST | ||
init-shell: bash | ||
create-args: >- | ||
python=3 pip | ||
--file requirements.txt | ||
--file requirements-dev.txt | ||
--channel conda-forge | ||
- name: Install package | ||
shell: bash -l {0} | ||
run: | | ||
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge | ||
micromamba activate TEST | ||
python -m pip install -e . --no-deps --force-reinstall | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(python setup.py --version) | ||
|
||
- name: Build documentation | ||
shell: bash -l {0} | ||
run: | | ||
set -e | ||
micromamba activate TEST | ||
jupyter nbconvert --to notebook --execute notebooks/tutorial.ipynb --output=tutorial-output.ipynb | ||
mv notebooks/*output.ipynb docs/source/ | ||
pushd docs | ||
make clean html linkcheck | ||
popd | ||
- name: Deploy | ||
uses: peaceiris/[email protected] | ||
if: success() && github.event_name == 'release' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html | ||
|