Skip to content

add tests

add tests #3

Workflow file for this run

name: Test
on: [push, pull_request]
defaults:
run:
shell: bash -l {0}
jobs:
build-linux:
name: Test on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-file: ./baredSC_dev_env.yml
cache-downloads: true
environment-name: baredSC_dev
- name: pip install
run: |
micromamba activate baredSC_dev
pip install .
- name: Test baredSC
run: |
micromamba activate baredSC_dev
pytest -v
- name: make an artifact
run: |
micromamba activate baredSC_dev
rm -f dist/*
python -m build
- uses: actions/upload-artifact@master
with:
name: "Dist files"
path: "dist"
test-wheels:
name: test wheel
runs-on: ubuntu-latest
needs: build-linux
strategy:
matrix:
python-version: ['3.7','3.8','3.9','3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: "Dist files"
path: ~/dist/
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: install wheel
run: |
pip install ~/dist/*whl
baredSC_1d -h
- name: pytest
run: |
pip install pytest
pytest -v
build-osx:
name: Test on OSX
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-file: .github/baredSC_dev.yml
cache-downloads: true
environment-name: baredSC_dev
- name: pip install
run: |
micromamba activate baredSC_dev
pip install .
- name: Test baredSC
run: |
micromamba activate baredSC_dev
pytest -v