Skip to content

Merge pull request #1 from lgrosjean/feat/add-tests #4

Merge pull request #1 from lgrosjean/feat/add-tests

Merge pull request #1 from lgrosjean/feat/add-tests #4

Workflow file for this run

name: Check
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 Poetry
run: |
pipx install poetry
poetry --version
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: poetry run pytest --cov=$PACKAGE_DIR $TESTS_DIR
lint:
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 Poetry
run: |
pipx install poetry
poetry --version
- name: Install dependencies
run: |
poetry install
- name: Lint with pylint
run: poetry run pylint --jobs 0 $PACKAGE_DIR --fail-under 9
format:
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 black
run: pip install black
- name: Check format with black
run: black --check $PACKAGE_DIR