Skip to content

add new gitlab action (#3) #21

add new gitlab action (#3)

add new gitlab action (#3) #21

name: Python tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: |
brew install cairo
poetry env use python${{ matrix.python-version }}
poetry install
- name: Lint with flake8
run: |
poetry run flake8
- name: Lint with black
run: poetry run black --check .
- name: Test with pytest
run: |
poetry run pytest