-
Notifications
You must be signed in to change notification settings - Fork 48
66 lines (66 loc) · 1.91 KB
/
rw-python-tests.yaml
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
name: tests
on:
workflow_call:
inputs:
changed-python-modules:
type: string
default: 'false'
jobs:
unit-tests:
runs-on: ubuntu-latest
if: ${{inputs.changed-python-modules == 'true'}}
strategy:
matrix:
python_version: [py312, py311, py310, py39]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Execute tests
run: |
make test-ci
env:
TEST_ENVS: ${{ matrix.python_version }}
- name: Upload coverage to Codecov
if: ${{ matrix.python_version == 'py312' }}
uses: codecov/codecov-action@v3
with:
files: ./gooddata-sdk/coverage.xml,./gooddata-pandas/coverage.xml,./gooddata-fdw/coverage.xml,./gooddata-flight-server/coverage.xml,./gooddata-flexconnect/coverage.xml
lint-and-format-check:
runs-on: ubuntu-latest
if: ${{inputs.changed-python-modules == 'true'}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: |
fmt-requirements.txt
- name: Install dependencies
run: |
make dev
- name: pep8 and formatting check
run: |
make format
types-check:
runs-on: ubuntu-latest
if: ${{inputs.changed-python-modules == 'true'}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: |
tox-requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tox-requirements.txt
- name: mypy check
run: |
make mypy