CI #1235
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: | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
# nightly tests at 2:42 | |
- cron: "42 2 * * *" | |
push: | |
branches: | |
- main | |
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 | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit ${{ matrix.rdkit-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
rdkit-version: ["latest", ] | |
os: [ubuntu-latest, macos-13, macos-latest] | |
include: | |
- rdkit-version: "2021" | |
python-version: "3.9" | |
os: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Additional info about the build | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" | |
# https://github.com/mamba-org/setup-micromamba | |
- uses: mamba-org/setup-micromamba@v1 | |
if: ${{ matrix.rdkit-version != 'latest' }} | |
with: | |
environment-file: devtools/conda-envs/CI_env.yaml | |
cache-environment: true | |
cache-downloads: true | |
cache-environment-key: environment-${{ steps.date.outputs.date }} | |
cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
create-args: >- | |
python=${{ matrix.python-version }} | |
rdkit=${{ matrix.rdkit-version }} | |
- uses: mamba-org/setup-micromamba@v1 | |
if: ${{ matrix.rdkit-version == 'latest' }} | |
with: | |
environment-file: devtools/conda-envs/CI_env.yaml | |
cache-environment: true | |
cache-downloads: true | |
cache-environment-key: environment-${{ steps.date.outputs.date }} | |
cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install package | |
run: python -m pip install --no-deps -v -e . | |
- name: Environment Information | |
run: | | |
micromamba info | |
micromamba list | |
- name: Test the package | |
run: pytest -vv | |
- name: Codecov | |
uses: codecov/codecov-action@v5 | |
if: ${{ github.repository == 'OpenFreeEnergy/Lomap' | |
&& github.event_name == 'pull_request' }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
fail_ci_if_error: False | |
verbose: True |