forked from taraslayshchuk/es2csv
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.82 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
61
62
63
64
65
66
67
68
69
70
71
name: Pytest
on:
pull_request:
branches: [main]
workflow_dispatch:
push:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: >-
Pytest - Python ${{ matrix.PYTHON_VERSION }}
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { PYTHON_VERSION: '3.8' }
- { PYTHON_VERSION: '3.9' }
- { PYTHON_VERSION: '3.10' }
- { PYTHON_VERSION: '3.11' }
- { PYTHON_VERSION: '3.12' }
steps:
- name: "Checkout to repository"
uses: actions/checkout@v4.1.7
- name: "Setup Python"
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.PYTHON_VERSION }}
cache: 'pip'
allow-prereleases: true
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements.dev.txt
- name: "Run tests"
uses: pavelzw/pytest-action@v2.2.0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Test reporter
uses: phoenix-actions/test-reporting@v15
if: always()
with:
name: EsXport tests for (Python ${{ matrix.PYTHON_VERSION }})
path: junit.xml
reporter: java-junit
output-to: step-summary
only-summary: true
max-annotations: 0