Skip to content

Update packaging to latest PyPA recommendations #942

Update packaging to latest PyPA recommendations

Update packaging to latest PyPA recommendations #942

Workflow file for this run

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:
lint:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8
run: |
flake8
- name: Run black
uses: rickstaa/action-black@v1
with:
black_args: ". --check"
build:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
max-parallel: 5
steps:
- uses: actions/checkout@v2
- 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: |
coverage run --concurrency=thread --parallel-mode -m pytest -vvv
coverage combine
coverage report