forked from elhuhdron/pylibczi
-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (51 loc) · 1.51 KB
/
py-build-pr.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
on: [pull_request]
name: Python Build PR
jobs:
python-test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 6
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install aicspylibczi
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Test with pytest
run: |
pytest -n1 --cov-report xml --cov=aicspylibczi aicspylibczi/tests
- name: Build the sdist
run: pipx run build --sdist
- name: Check install from sdist
run: |
MY_VERSION=$(python setup.py --version)
pip install dist/aicspylibczi-$MY_VERSION.tar.gz
shell: bash
- name: Upload codecov
uses: codecov/codecov-action@v3
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Lint with flake8
run: |
flake8 aicspylibczi --count --verbose --max-line-length=127 --show-source --statistics