Skip to content

GH Actions CI

GH Actions CI #188

Workflow file for this run

name: GH Actions CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# 3 am Tuesdays and Fridays
- cron: "0 3 * * 2,5"
concurrency:
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
unittests:
if: "github.repository == 'MDAnalysis/panedr'"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
include:
- os: windows-latest
python-version: "3.11"
- os: macos-latest
python-version: "3.11"
steps:
- uses: actions/checkout@v3
- name: setup_miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
channel-priority: flexible
channels: conda-forge
add-pip-as-python-dependency: true
use-mamba: true
miniforge-variant: Mambaforge
- name: install package deps
run: |
mamba install pytest pytest-xdist pytest-cov codecov pbr numpy tqdm
- name: check install
run: |
which python
which pip
conda info
conda list
- name: install pyedr package
run: |
# installing via pip leads to codecov not being able to report coverage
cd pyedr && python setup.py develop
- name: run pyedr tests
run: |
pytest -n 2 -v --cov=pyedr/pyedr --cov-report=xml --color=yes pyedr/pyedr/tests
- name: install panedr package
run: |
mamba install pandas
cd panedr && python setup.py develop
- name: run panedr tests
run: |
pytest -n2 -v --cov=panedr/panedr --cov-report=xml --color=yes --cov-append panedr/panedr/tests
- name: test imports
# Exit the git repo in order for pbr to stop auto-picking up version info
# from the local git data
working-directory: ../
run: |
python -Ic "from pyedr import edr_to_dict"
python -Ic "from panedr import edr_to_df"
- name: codecov
if: ${{ github.event_name != 'schedule' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: True
verbose: True