CI #932
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 * * *" | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, ubuntu-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Conda Environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: devtools/conda-envs/test_env.yaml | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install Package | |
run: | | |
python -m pip install -e . | |
- name: Run Tests | |
run: | | |
pytest -v -nauto --cov=smirnoff_plugins --cov-report=xml --color=yes smirnoff_plugins/_tests/ | |
- name: Run Example | |
shell: bash -l {0} | |
run: | | |
python examples/buckingham-water.py | |
- name: Run mypy | |
continue-on-error: true | |
run: | | |
mypy smirnoff_plugins/ | |
- name: CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} |