-
Notifications
You must be signed in to change notification settings - Fork 33
48 lines (43 loc) · 1.42 KB
/
tox.yaml
File metadata and controls
48 lines (43 loc) · 1.42 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
name: Run Tox tests
permissions:
contents: read
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
name: "Python ${{ matrix.python-version }}, Postgres=${{ matrix.with-postgres }}"
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
with-postgres: [true, false]
fail-fast: false
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
fetch-depth: 0 # fetch all history including tags -- necessary to determine the version from SCM
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Install PostgreSQL
if: ${{ matrix.with-postgres }}
uses: tj-actions/install-postgresql@a889ed6c6fa05022333ed4101295bb1d604f97a8 # v3.2.0
with:
postgresql-version: 17
- name: Setup PostgreSQL for testing
if: ${{ matrix.with-postgres }}
run: echo "LNT_POSTGRES_DB_URI=postgresql://postgres@localhost" >> $GITHUB_ENV
- name: Tox flake8
run: tox -e flake8
- name: Tox docs
run: tox -e docs
- name: Tox mypy
run: tox -e mypy
- name: Tox py3
run: tox -e py3