Skip to content

path

path #14

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: tests
on:
push:
branches:
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
channels: conda-forge
auto-activate-base: false
activate-environment: tests
environment-file: environment.yml
use-mamba: true
- name: Install dependencies
run: |
conda activate tests
conda install pytest
pip install -e .
# this runs the platform-specific tests declared in tox.ini
- name: Test with pytest
run: |
conda activate tests
pytest tests/
env:
PLATFORM: ${{ matrix.platform }}