diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b74e67f1..6f7bf591 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,48 @@ on: jobs: + flopy_setup: + name: standard installation + runs-on: ubuntu-latest + strategy: + fail-fast: false + defaults: + run: + shell: bash + + if: github.repository_owner == 'modflowpy' + steps: + + # check out repo + - name: Checkout flopy repo + uses: actions/checkout@v2.3.4 + + - name: Setup Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Upgrade pip + run: | + python -m pip install --upgrade pip + + - name: Base flopy installation + run: | + pip install . + + - name: Print flopy version + run: | + python -c "import flopy; print(flopy.__version__)" + + flopy_lint: name: linting runs-on: ubuntu-latest strategy: fail-fast: false + defaults: + run: + shell: bash if: github.repository_owner == 'modflowpy' steps: @@ -34,18 +71,15 @@ jobs: python-version: 3.8 - name: Print python version - shell: bash run: | python --version - name: Install Python 3.8 packages - shell: bash run: | python -m pip install --upgrade pip pip install -r etc/requirements.pip.txt - name: Run black - shell: bash run: | echo "if black check fails run" echo " black --line-length 79 ./flopy" @@ -53,18 +87,16 @@ jobs: black --check --line-length 79 ./flopy - name: Run flake8 - shell: bash run: | flake8 --count --show-source --exit-zero ./flopy - name: Run pylint - shell: bash run: | pylint --jobs=2 --errors-only --exit-zero ./flopy flopyCI: name: autotests - needs: flopy_lint + needs: [flopy_setup, flopy_lint] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -82,9 +114,9 @@ jobs: python-version: 3.8 run-type: script test-path: autotest_scripts.py -# exclude: -# - os: macos-latest -# python-version: 3.6 + defaults: + run: + shell: bash steps: # check out repo @@ -146,7 +178,6 @@ jobs: - name: Setup symbolic link to gfortran on macOS if: runner.os == 'macOS' - shell: bash run: | sudo ln -fs /usr/local/bin/gfortran-10 /usr/local/bin/gfortran sudo ln -fs /usr/local/bin/gcc-10 /usr/local/bin/gcc @@ -166,7 +197,6 @@ jobs: cd .. - name: Add executables directory to path - shell: bash run: | echo "$HOME/.local/bin" >> $GITHUB_PATH