Major Refactoring of the Code Base #210
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: Test Pinned Dependencies | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build_wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.12"] | |
name: Build wheel on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
# Required when using an activated conda environment in steps | |
# See https://github.com/conda-incubator/setup-miniconda#IMPORTANT | |
shell: bash -l {0} | |
steps: | |
- name: Set environment variables | |
# needed for testing the napari plugin | |
if: matrix.os == 'ubuntu-latest' | |
run: echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV | |
- uses: actions/checkout@main | |
- uses: conda-incubator/setup-miniconda@v3 | |
name: Setup conda environment | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: paste | |
environment-file: environment.yml | |
- name: Install package | |
# Note: editable install for the coverage step to pick up source | |
# correctly. (coverage run --source=src/paste3 -m pytest) | |
run: pip install -e . --no-deps | |
- name: Pre-commit checks | |
run: pre-commit run --all-files | |
- name: List dependencies | |
run: pip freeze | |
- name: Pytest | |
if: matrix.os != 'ubuntu-latest' | |
run: pytest -n auto | |
- name: Pytest with coverage | |
if: matrix.os == 'ubuntu-latest' | |
# Note: Use of pytest -n .. (pytest-xdist) does not work with coverage | |
run: coverage run --source=src/paste3 -m pytest | |
- name: Upload coverage to Coveralls | |
if: matrix.os == 'ubuntu-latest' | |
run: coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |