2022-07-20 13:31:43 +00:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2023-11-08 23:07:04 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.11"
|
|
|
|
- name: Install poetry
|
|
|
|
uses: abatilo/actions-poetry@v2
|
|
|
|
with:
|
|
|
|
poetry-version: 1.6.1
|
|
|
|
- name: Install project
|
|
|
|
run: poetry install --all-extras
|
|
|
|
- name: Run pre-commit which does various checks
|
|
|
|
run: poetry run pre-commit run --all-files --show-diff-on-failure
|
2022-07-20 13:31:43 +00:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-12-06 15:23:52 +00:00
|
|
|
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
2022-07-20 13:31:43 +00:00
|
|
|
steps:
|
2023-09-19 10:55:30 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-20 13:31:43 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2023-09-19 10:55:30 +00:00
|
|
|
uses: actions/setup-python@v4
|
2022-07-20 13:31:43 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install poetry
|
2023-09-19 10:55:30 +00:00
|
|
|
uses: abatilo/actions-poetry@v2
|
2022-07-20 13:31:43 +00:00
|
|
|
with:
|
2023-12-06 15:23:52 +00:00
|
|
|
poetry-version: 1.6.1
|
2022-07-20 13:31:43 +00:00
|
|
|
- name: Install project
|
2023-11-08 23:07:04 +00:00
|
|
|
run: poetry install --all-extras --only main
|
2022-07-20 13:31:43 +00:00
|
|
|
- name: Build project
|
|
|
|
run: poetry build
|