CI #483
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: | |
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming | |
# Existing codes likely still have "master" as the primary branch | |
# Both are tracked here to keep legacy and new codes working | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
# Midnight Tuesdays and Fridays | |
- cron: "0 0 * * 2,5" | |
concurrency: | |
# Probably overly cautious group naming. | |
# Commits to develop/master will cancel each other, but PRs will only cancel | |
# commits within the same PR | |
group: "${{ github.ref }}-${{ github.head_ref }}" | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --files solvation_analysis/* | |
test: | |
name: pip install on ${{ matrix.os }}, Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
python-version: [3.9, "3.10", 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package | |
run: | | |
python -m pip install . | |
- name: Run tests | |
run: | | |
pytest -v --color=yes solvation_analysis/tests/ | |
- name: CodeCov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} |