Skip to content

CI

CI #1044

Workflow file for this run

name: CI
on:
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: "tests"
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'macos']
python-version:
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
channel-priority: true
environment-file: devtools/conda-envs/env.yaml
use-mamba: true
miniforge-variant: Mambaforge
- name: Additional info about the build
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
run: |
conda info --all
conda list
mamba --version
- name: Install package
run: |
python -m pip install -e .
- name: Run tests
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@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true # optional (default = false)