Skip to content

refactor(ci/tests): use awvwgk/setup-fortran, use pytest tempdirs #206

refactor(ci/tests): use awvwgk/setup-fortran, use pytest tempdirs

refactor(ci/tests): use awvwgk/setup-fortran, use pytest tempdirs #206

name: pymake linting/installation
on:
schedule:
- cron: '0 3 * * 3' # run at 3 AM UTC every Wednesday
push:
branches: [ master ]
pull_request:
branches:
- master
jobs:
pymake_lint:
name: pymake linting
runs-on: ubuntu-latest
if: github.repository_owner == 'modflowpy'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4.3.0
with:
python-version: "3.10"
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install packages
run: |
pip install requests pydotplus appdirs numpy matplotlib
pip install https://github.com/modflowpy/flopy/zipball/develop
pip install pylint flake8 black
- name: Run isort
run: |
echo "if isort check fails update isort using"
echo " pip install isort --upgrade"
echo "and run"
echo " isort ./flopy"
echo "and then commit the changes."
isort --verbose --check --diff ./pymake
- name: Run black
run: |
echo "if black check fails update black using"
echo " pip install black --upgrade"
echo "and run"
echo " black ./flopy"
echo "and then commit the changes."
black --check --diff ./pymake
- name: Run flake8
run: flake8 --count --show-source --exit-zero ./pymake
- name: Run pylint
run: pylint --jobs=2 --errors-only --exit-zero ./pymake
pymake_setup:
name: standard installation
runs-on: ubuntu-latest
strategy:
fail-fast: false
defaults:
run:
shell: bash
steps:
# check out repo
- name: Checkout pymake repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4.3.0
with:
python-version: "3.10"
- name: Upgrade pip and install build and twine
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Base pymake installation
run: |
pip --verbose install .
- name: Print pymake version
run: |
python -c "import pymake; print(pymake.__version__)"
- name: Build pymake, check dist outputs
run: |
python -m build
twine check --strict dist/*