-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (53 loc) · 1.83 KB
/
test_pinned_deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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 }}