-
Notifications
You must be signed in to change notification settings - Fork 27
51 lines (42 loc) · 1.13 KB
/
python-package.yml
File metadata and controls
51 lines (42 loc) · 1.13 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: SQLalchemySerializer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
POSTGRES_HOST: 'localhost'
POSTGRES_DB: 'db_name'
POSTGRES_USER: 'root'
POSTGRES_PASSWORD: 'password'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
uv sync --all-groups
- name: Lint with ruff
run: |
uv run ruff check .
- name: Set up test database
uses: harmon758/postgresql-action@v1
with:
postgresql version: '11'
postgresql db: $POSTGRES_DB
postgresql user: $POSTGRES_USER
postgresql password: $POSTGRES_PASSWORD
- name: Run tests
run: |
uv run pytest --cov=sqlalchemy_serializer --cov-report term-missing