Skip to content

Merge pull request #86 from jan-glx/patch-1 #510

Merge pull request #86 from jan-glx/patch-1

Merge pull request #86 from jan-glx/patch-1 #510

name: Tests & Coverage
on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
jobs:
build:
name: Test (${{ matrix.python-version }}, ${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ 'macos-latest', 'windows-latest' ]
python-version: ["3.10", "3.9", "3.8", "3.7"]
include:
- os: ubuntu-latest
python-version: "3.7"
- os: ubuntu-latest
python-version: "3.8"
codecov: true
- os: ubuntu-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.10"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('environment-ci.yml') }}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
add-pip-as-python-dependency: true
activate-environment: pydna_test_environment
python-version: ${{ matrix.python-version }}
environment-file: pydna_test_environment.yml
use-only-tar-bz2: true
- name: conda info
shell: bash -l {0}
run: conda info --all
- name: conda list
shell: bash -l {0}
run: conda list
- name: Install from source
shell: bash -l {0}
run: pip install --editable . --no-deps
- name: python run_test.py
shell: bash -l {0}
run: python run_test.py
- name: Upload coverage to Codecov
if: (matrix.codecov)
uses: codecov/[email protected]
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true