Skip to content

unit testing

unit testing #11

Workflow file for this run

name: unit testing
on:
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- 'README.md'
schedule:
- cron: '30 23 * * SUN'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install pyproject2conda
run: |
conda install -c conda-forge pyproject2conda -y
- name: Convert pyproject to environment.yml
run: |
pyproject2conda yaml -e test --python-include python=${{ matrix.python-version }} > environment.yml
- name: Install dependencies from environment.yml
run: |
conda env update --file environment.yml --name base
rm environment.yml
- name: Test with pytest
run: |
pytest