Skip to content

feat: restructure repository and add integrations (#126) #473

feat: restructure repository and add integrations (#126)

feat: restructure repository and add integrations (#126) #473

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths:
- "python/**"
- ".github/**"
pull_request:
branches:
- main
paths:
- "python/**"
- ".github/**"
jobs:
tests:
name: Tests
defaults:
run:
shell: bash
working-directory: ./python
strategy:
matrix:
os: [ubuntu-latest]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
include:
- os: macos-latest
python-version: "3.10.10"
- os: windows-latest
python-version: "3.10.10"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
version: 1.3.2
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- run: poetry install --no-interaction
- name: Run tests
run: |
source $VENV
poetry run pytest
linting:
name: Lint & Formatting
defaults:
run:
shell: bash
working-directory: ./python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- run: poetry install --no-interaction
- run: poetry run black --check .
- run: poetry run pylint $(git ls-files '*.py')