Merge pull request #368 from Mara3l/PMK-1169 #785
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '.docker/**' | |
- 'gooddata-fdw/**' | |
- '!gooddata-fdw/docs/**' | |
- 'gooddata-pandas/**' | |
- '!gooddata-pandas/docs/**' | |
- 'gooddata-sdk/**' | |
- '!gooddata-sdk/docs/**' | |
- '*.mk' | |
- 'Makefile' | |
- '!docs/**' | |
- 'gooddata-api-client/**' | |
- 'gooddata-dbt/**' | |
push: | |
branches: | |
- master | |
paths: | |
- '.docker/**' | |
- 'gooddata-fdw/**' | |
- '!gooddata-fdw/docs/**' | |
- 'gooddata-pandas/**' | |
- '!gooddata-pandas/docs/**' | |
- 'gooddata-sdk/**' | |
- '!gooddata-sdk/docs/**' | |
- '*.mk' | |
- 'Makefile' | |
- '!docs/**' | |
- 'gooddata-api-client/**' | |
- 'gooddata-dbt/**' | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python_version: [py311, py310, py39, py38] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Execute tests | |
run: | | |
make test-ci | |
env: | |
TEST_ENVS: ${{ matrix.python_version }} | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.python_version == 'py311' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./gooddata-sdk/coverage.xml,./gooddata-pandas/coverage.xml,./gooddata-fdw/coverage.xml | |
lint-and-format-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: '.python-version' | |
cache: 'pip' | |
cache-dependency-path: | | |
lint-requirements.txt | |
fmt-requirements.txt | |
- name: Install dependencies | |
run: | | |
make dev | |
- name: Pep8 check | |
run: | | |
make lint | |
- name: Formatting check | |
run: | | |
make format | |
types-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
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 |