forked from stapi-spec/stapi-fastapi
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 933 Bytes
/
python-publish.yml
File metadata and controls
36 lines (34 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: PR Checks
on:
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pip
.venv
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install
run: |
python -m pip install poetry==1.7.1
poetry install --with=dev
- name: Lint
run: |
poetry run pre-commit run --all-files
- name: Test
run: poetry run pytest