Skip to content

Feat/add tests

Feat/add tests #1

Workflow file for this run

name: Test
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
env:
PACKAGE_DIR: powerbi_ext
TESTS_DIR: tests
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Pytest
run: pip install pytest pytest-cov
- name: Test with pytest
run: pytest --cov=$PACKAGE_DIR $TESTS_DIR
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pylint
run: pip install pylint
- name: Lint with pylint
run: pylint --jobs 0 $PACKAGE_DIR --fail-under 9
format:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install black
run: pip install black
- name: Check format with black
run: black --check $PACKAGE_DIR