Bump actions/setup-python from 4 to 5 (#331) #1194
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
name: Unit Tests | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: # allow manual triggering | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
# needs: lint | |
strategy: | |
max-parallel: 5 | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Python ${{ matrix.python-version }} environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
cache-environment: true | |
cache-environment-key: env-key-${{ matrix.python-version }} | |
condarc: | | |
channel-priority: flexible | |
environment-file: environment.yml | |
environment-name: hklpy-test-py-${{ matrix.python-version }} | |
create-args: >- | |
coveralls | |
pytest | |
pytest-cov | |
python=${{ matrix.python-version }} | |
- name: conda environments | |
shell: bash -l {0} | |
run: | | |
conda env list | |
micromamba env list | |
python --version | |
- name: Install the hklpy package | |
shell: bash -l {0} | |
run: | | |
pip install -e . | |
- name: Diagnostics | |
shell: bash -l {0} | |
run: | | |
pwd | |
ls -lAFgh | |
conda list -r | |
conda list | |
micromamba list | |
- name: Test with coverage and pytest | |
shell: bash -l {0} | |
run: | | |
set -vxeuo pipefail | |
coverage run --concurrency=thread --parallel-mode -m pytest -vvv | |
coverage combine | |
coverage report |