Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,11 @@ jobs:
run: |
conda install -n flopy -c conda-forge jupyter nbconvert

- name: Add jupyter and jupytext to scripts run
if: matrix.run-type == 'script'
shell: bash -l {0}
run: |
conda install -n flopy -c conda-forge jupyter jupytext

- name: Add packages to flopy environment
shell: bash -l {0}
run: |
conda env update --name flopy --file etc/environment.yml

- name: Determine python environment
shell: bash -l {0}
run: |
conda info
conda list

- name: Install pymake, xmipy, and flopy
shell: bash -l {0}
run: |
Expand All @@ -151,53 +139,7 @@ jobs:
--with-coverage --cover-package=flopy --cover-xml \
--cover-xml-file=../coverage.xml -w ./autotest ${{ matrix.test-path }}

- name: List files in the root directory
shell: bash
run: |
ls -l

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.12
with:
file: ./coverage.xml

- name: Run jupytext on tutorials
if: matrix.run-type == 'script'
shell: bash -l {0}
run: |
cd .docs/
python tutorials2ipynb.py
cd ../

- name: Upload completed jupyter notebooks as an artifact for ReadtheDocs
if: matrix.run-type == 'script' && github.repository_owner == 'modflowpy'
uses: actions/upload-artifact@v2
with:
name: notebooks-for-${{ github.sha }}
path: |
.docs/_notebooks

# trigger rtd if previous job was successful
rtd:
name: ReadtheDocs
needs: flopyCI
runs-on: ubuntu-latest

if: github.repository_owner == 'modflowpy'
steps:
- name: Checkout flopy repo
uses: actions/checkout@v2

- name: Output repo information
run: |
echo ${{ github.repository_owner }}
echo ${{ github.repository }}
echo ${{ github.ref }}

- name: Trigger RTDs build on master and develop branches
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
uses: dfm/rtds-action@v1.0.0
with:
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
commit_ref: ${{ github.ref }}
97 changes: 97 additions & 0 deletions .github/workflows/rtd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Read the Docs

on:
push:
branches: [master, develop]
pull_request:
branches: [develop]

jobs:

build:
name: rtd
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
# check out repo
- name: Checkout flopy repo
uses: actions/checkout@v2

- name: Output repo information
run: |
echo $GITHUB_REPOSITORY_OWNER
echo $GITHUB_REPOSITORY
echo $GITHUB_REF
echo $GITHUB_EVENT_NAME

# Standard python fails on windows without GDAL installation
# Using custom bash shell ("shell: bash -l {0}") with Miniconda
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.6.0
with:
python-version: 3.8
auto-update-conda: true
auto-activate-base: true
activate-environment: flopy

- name: Add jupyter and jupytext to scripts run
shell: bash -l {0}
run: |
conda install -n flopy -c conda-forge jupyter jupytext

- name: Add packages to flopy environment
shell: bash -l {0}
run: |
conda env update --name flopy --file etc/environment.yml

- name: Install pymake, xmipy, and flopy
shell: bash -l {0}
run: |
pip install https://github.com/modflowpy/pymake/zipball/master
pip install xmipy
pip install .

- name: Download executables needed for tests
shell: bash -l {0}
run: |
python ./autotest/get_exes.py

- name: Add executables directory to path
shell: bash
run: |
echo "::add-path::$HOME/.local/bin"

- name: Run jupytext on tutorials
shell: bash -l {0}
run: |
cd .docs/
python tutorials2ipynb.py
cd ../

- name: Upload completed jupyter notebooks as an artifact for ReadtheDocs
if:
github.repository_owner == 'modflowpy' &&
contains(github.ref, '
refs/heads/master
refs/heads/develop
')
uses: actions/upload-artifact@v2
with:
name: notebooks-for-${{ github.sha }}
path: |
.docs/_notebooks

- name: Trigger RTDs build on master and develop branches
if:
github.repository_owner == 'modflowpy' &&
contains('
refs/heads/master
refs/heads/develop
', github.ref)
uses: dfm/rtds-action@v1.0.0
with:
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
commit_ref: ${{ github.ref }}