Fix max_scf_cycles assignment #48 #186
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package tests | |
on: | |
# Triggers the workflow on push or pull request events but only for non-docs commits | |
push: | |
paths-ignore: | |
- CITATION.cff | |
- .github/workflows/citation-cff.yml | |
pull_request: | |
paths-ignore: | |
- CITATION.cff | |
- .github/workflows/citation-cff.yml | |
jobs: | |
lint: | |
name: Lint with flake8 and black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
if [ -f requirements-lint.txt ]; then pip install -r requirements-lint.txt; else pip install .[dev]; fi | |
- name: Lint with flake8 | |
run: flake8 . --count --show-source --statistics | |
- name: Check formatting with black | |
run: black --check . | |
build: | |
name: Test on Python ${{ matrix.python-version }} and ${{ matrix.os }} | |
needs: lint # don't run if linting failed | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.10"] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
shell: bash # Windows runners have Git Bash installed so this should work on all runners | |
- name: Install package | |
run: pip install -e . | |
- name: Test with pytest | |
run: pytest --cov pymuonsuite --cov-report xml | |
- name: Upload to Codecov | |
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 |