Tests with Conda #313
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
# Testing with conda - heavier than the PIP version, | |
# this includes different engines and plugins | |
name: Tests with Conda | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ master ] | |
schedule: | |
- cron: '36 21 * * 6' | |
# 2023-10-26: Essential in the new setup-micromamba scheme. | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
build-linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
# - macOS-latest | |
- ubuntu-latest | |
python-version: | |
- "3.8" | |
- "3.9" | |
env: | |
CI_OS: ${{ matrix.os }} | |
PYVER: ${{ matrix.python-version }} | |
PACKAGE: geometric | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up conda environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: devtools/conda-envs/latest.yaml | |
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces | |
python=${{ matrix.python-version }} | |
- name: Install package | |
run: | | |
python -c "import numpy; print(numpy.__version__)" | |
# This is the essential install line. The others are debugging statements. | |
python -m pip install --no-deps . | |
python -c "import numpy; print(numpy.__version__)" | |
python -c "import geometric; print(geometric.__version__)" | |
env | grep geometric-test | |
- name: pytest | |
run: pytest -v --cov=geometric geometric/tests/ | |
# LPW 2022-10-03 Commenting out because GH Actions cannot test or cover Engine interfaces to commercial packages. | |
# Enabling Codecov upload for GH Actions would undercount the lines actually covered. | |
# - name: Codecov upload | |
# uses: codecov/codecov-action@v1 | |
# with: | |
# flags: unittests-conda | |
# fail_ci_if_error: true | |
# verbose: true |