Merge pull request #218 from Jette87/main #333
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
name: Test | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
name: ${{ matrix.name }}-py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ubuntu, macos] | |
python-version: ["3.8", "3.9", "3.10"] | |
include: | |
- name: ubuntu | |
os: ubuntu-22.04 | |
- name: macos | |
os: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install GCC (MacOS) | |
if: matrix.name == 'macos' | |
run: | | |
brew install gcc@12 | |
echo "CC=gcc-12" >> $GITHUB_ENV | |
echo "FC=gfortran-12" >> $GITHUB_ENV | |
- name: Install | |
run: | | |
python -m pip install --upgrade pip wheel | |
TARGET=HASWELL python -m pip install -v .[docs,tests] | |
python -m pip list | |
- name: Lint with flake8 | |
if: matrix.name == 'ubuntu' && matrix.python-version == '3.9' | |
continue-on-error: true | |
run: | | |
python -m pip install flake8 | |
flake8 . --statistics || echo "::error::Check flake8 output for errors" | |
- name: Test | |
run: | | |
python -m pip install pytest | |
python -m pytest --pyargs konrad | |
- name: Build docs | |
continue-on-error: true | |
run: | | |
cd docs && make html || echo "::error::Documentation build errored." |