Skip to content

CI

CI #2155

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Run a cron job once daily
- cron: "0 0 * * *"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version:
- "3.11"
- "3.12"
- "3.13"
include:
- os: "macos-latest"
python-version: "3.12"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: "Setup Micromamba"
uses: mamba-org/setup-micromamba@v3
with:
environment-file: devtools/conda-envs/env.yaml
environment-name: cinnabar
create-args: >-
python=${{ matrix.python-version }}
init-shell: bash
- name: Additional info about the build
run: |
uname -a
df -h
ulimit -a
- name: "Environment Information"
run: |
micromamba info
micromamba list
pip list
- name: Install package
run: python -m pip install --no-deps -e .
- name: "Test imports"
run: |
# if we add more to this, consider changing to for + env vars
python -Ic "import cinnabar; print(cinnabar.__version__)"
- name: Run tests
env:
DUECREDIT_ENABLE: "yes"
shell: bash -l {0}
run: |
pytest -v --cov=cinnabar/ --cov-report=xml --cov-report=term --color=yes cinnabar/tests/
- name: codecov
if: ${{ github.repository == 'OpenFreeEnergy/cinnabar' && github.event_name != 'schedule'}}
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true # optional (default = false)