-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 1.7 KB
/
Copy pathTestWithSinglePython.yml
File metadata and controls
62 lines (56 loc) · 1.7 KB
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test single python version
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
# PyPI's simple index occasionally returns transient 5xx responses.
# Retry more aggressively than pip's default before failing the job.
PIP_RETRIES: "10"
PIP_TIMEOUT: "60"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
pip install numpy
pip install setuptools
pip install pytest_mock
- name: Install debrisframe
run: |
pip install .
- name: Test with pytest
run: |
pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc
- uses: qltysh/qlty-action/coverage@v1
with:
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: cov.info
- name: Build wheel
run: |
python -m pip install build
python -m build --wheel
- name: Smoke test wheel import
run: |
python -m venv /tmp/smoke
/tmp/smoke/bin/pip install dist/*.whl
/tmp/smoke/bin/python -c "import debrisframe"