41 lines
743 B
YAML
41 lines
743 B
YAML
name: fastapi build
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install poetry
|
|
uses: abatilo/actions-poetry@v2
|
|
|
|
- name: Install dependencies
|
|
working-directory: server
|
|
run: |
|
|
poetry install
|
|
|
|
- name: Lint with black
|
|
working-directory: server
|
|
run: |
|
|
poetry run black --check .
|
|
|
|
- name: Test with pytest
|
|
working-directory: server
|
|
run: |
|
|
poetry run pytest -s
|