Merge pull request #51 from jonathan-schoeps/dev/dist_covalent_radii #3
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 | |
paths-ignore: | |
- "docs/**" | |
- "assets/**" | |
- "*.md" | |
- "*.rst" | |
- "mindlessgen.toml" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "docs/**" | |
- "assets/**" | |
- "*.md" | |
- "*.rst" | |
- "mindlessgen.toml" | |
workflow_dispatch: | |
jobs: | |
# Run linting and formatting with and static type checking with mypy | |
static-tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install linter and formatter | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff==0.5.7 | |
- name: Run ruff linting | |
run: ruff check --no-fix | |
- name: Run ruff format | |
run: ruff format --check | |
- name: Install project and all dev dependencies | |
run: pip install -e ".[dev]" | |
- name: Run mypy | |
run: mypy . | |
# Run unittests with tox | |
tox: | |
needs: static-tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
# with '-e py' tox runs the python version of the current environment | |
- name: Unittests with tox | |
run: tox -e py | |
# Coverage does not work for private repos | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v4 | |
# if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' | |
# with: | |
# files: ./coverage.xml # optional |