-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.42 KB
/
master_tests.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
name: Tests
on:
push:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-xdist
pip install pytest-ordering
pip install pytest-order
pip install pytest-cov
- name: Add 'src' to PYTHONPATH
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src:." >> $GITHUB_ENV
- name: Execute tests
id: tests
run: pytest tests -n=auto --dist=loadfile --order-scope=module --cov=src/pytest_rerunclassfailures --cov-report=term --cov-report=xml:coverage.xml --cov-report=html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: wwakabobik/pytest-rerunclassfailures
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}