CI #54
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: "CI" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 1 | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[dev]" | |
- name: Look for auto format errors | |
run: black --check --diff src/pyfsolver tests | |
- name: Check for import stylle | |
run: isort --profile black --check --diff src/pyfsolver tests | |
- name: Run mypy | |
run: mypy --package tests --package pyfsolver | |
- name: Lint with flake8 | |
run: flake8 | |
setup_install: | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 2 | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: run pyfsolver | |
run: | | |
pyfsolver | |
pyfsolver -v | |
pyfsolver fortran tests/coo_files/sist3.mtx tests/coo_files/sist3_b.mtx | |
pyfsolver numpy tests/coo_files/sist3.mtx tests/coo_files/sist3_b.mtx | |
build_tests: | |
needs: setup_install | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 2 | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[dev]" | |
- name: test | |
run: pytest tests | |
- name: test | |
run: | | |
meson setup builddir | |
meson compile -C builddir | |
meson test -C builddir |