-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.56 KB
/
pytest.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
name: 🐍 Otto pytest
on:
workflow_call:
inputs:
python_version:
description: The version of python to setup
type: string
default: 3.11
pip_extras:
description: A list of pip extras to install
type: string
default: '[test]'
pytest_args:
description: Additional args to pass to pytest.
type: string
jobs:
run_pytest:
name: 🐍 pytest
runs-on: ubuntu-latest
environment: codecov
env:
BEZIER_NO_EXTENSION: true
steps:
- name: 📰 Checkout
uses: actions/checkout@v3
- name: 🐍 Setup Python
uses: actions/setup-python@main
id: setup-python
with:
python-version: ${{ inputs.python_version }}
cache: pip
- name: 🏗️ Install dependencies
run: pip install .${{ inputs.pip_extras }}
- name: 🖼️ Install Imagemagick
uses: mfinelli/setup-imagemagick@v2
- name: 🛸 Configure extra test dependencies
run: |
sudo apt install -y libfuse2 fonts-open-sans
mkdir -p data
sudo rm /etc/ImageMagick-6/policy.xml
- name: 🧪 Run pytest suite
run: pytest -v --cov --cov-report lcov ${{ inputs.pytest_args }}
- name: 📈 Uploade coverage report
# always run this step, even if the tests fail
# putting always() would cause the function to run even if the build is canceled
if: success() || failure()
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}