Skip to content

fix(HeadFile): fix dis reversal, expand tests (#2247) #47

fix(HeadFile): fix dis reversal, expand tests (#2247)

fix(HeadFile): fix dis reversal, expand tests (#2247) #47

Workflow file for this run

name: FloPy documentation
on:
push:
pull_request:
branches:
- master
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rtd_build:
name: Prepare and test notebooks
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout flopy repo
uses: actions/checkout@v4
- name: Output repo information
run: |
echo $GITHUB_REPOSITORY_OWNER
echo $GITHUB_REPOSITORY
echo $GITHUB_REF
echo $GITHUB_EVENT_NAME
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: etc/environment.yml
cache-environment: true
cache-downloads: true
create-args: >-
python=3.12
init-shell: >-
bash
powershell
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install .
- name: Workaround OpenGL issue on Linux
if: runner.os == 'Linux'
run: |
# referenced from https://github.com/pyvista/pyvista/blob/main/.github/workflows/vtk-pre-test.yml#L53
pip uninstall -y vtk
pip install --extra-index-url https://wheels.vtk.org trame vtk-osmesa
- name: Install fonts on Linux
if: runner.os == 'Linux'
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer fonts-liberation
sudo rm -rf ~/.cache/matplotlib
- name: Install OpenGL on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'
powershell .github/install_opengl.ps1
- name: Install Modflow-related executables
uses: modflowpy/install-modflow-action@v1
- name: Install Modflow dev build executables
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build
- name: Install triangle (macOS workaround)
if: runner.os == 'macOS'
uses: modflowpy/install-modflow-action@v1
with:
repo: executables
ostag: mac
subset: triangle
- name: Run tutorial and example notebooks
working-directory: autotest
run: pytest -v -n auto test_notebooks.py
- name: Upload notebooks artifact for ReadtheDocs
if: github.repository_owner == 'modflowpy' && github.event_name == 'push' && runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: notebooks-for-${{ github.sha }}
path: .docs/Notebooks/*.ipynb
# trigger rtd if previous job was successful
rtd:
name: Read the Docs trigger
needs: rtd_build
runs-on: ubuntu-latest
if:
github.repository_owner == 'modflowpy' && github.event_name == 'push'
steps:
- name: Trigger RTDs build on master and develop branches
uses: dfm/rtds-action@v1
with:
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
commit_ref: ${{ github.ref }}