11name : CI
22on : [push, pull_request]
33
4- env :
5- POETRY_HOME : /home/runner/.local
6- POETRY_CACHE_DIR : /home/runner/.local/.cache
7-
84jobs :
9- prepare :
10- strategy :
11- fail-fast : false
12- matrix :
13- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
14- sqlalchemy-version : ["<2.0", "default"]
15- os : [ubuntu-20.04]
16- runs-on : ${{ matrix.os }}
17- steps :
18- - uses : actions/checkout@v4
19- - uses : actions/setup-python@v5
20- with :
21- python-version : ${{ matrix.python-version }}
22- - name : Set up cache
23- id : cached-dependencies
24- uses : actions/cache@v4
25- with :
26- path : /home/runner/.local
27- key : os-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ matrix.sqlalchemy-version }}-${{ hashFiles('**/poetry.lock') }}-poetry-1.6.1
28- - name : Install and set up Poetry
29- if : steps.cached-dependencies.outputs.cache-hit != 'true'
30- run : make install-poetry
31- - name : Install packages
32- if : steps.cached-dependencies.outputs.cache-hit != 'true'
33- run : make install-packages opts="--no-root"
34- - name : Downgrade SQLAlchemy
35- if : ${{ matrix.sqlalchemy-version != 'default' }}
36- run : poetry run pip install -U "sqlalchemy${{ matrix.sqlalchemy-version }}"
37- - name : Downgrade Flask-SQLAlchemy
38- if : ${{ matrix.sqlalchemy-version != 'default' }}
39- run : poetry run pip install -U "flask-sqlalchemy<3.1"
40-
41- lint :
42- strategy :
43- fail-fast : false
44- matrix :
45- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
46- sqlalchemy-version : ["<2.0", "default"]
47- os : [ubuntu-20.04]
48- runs-on : ${{ matrix.os }}
49- needs : prepare
50- steps :
51- - uses : actions/checkout@v4
52- - uses : actions/setup-python@v5
53- with :
54- python-version : ${{ matrix.python-version }}
55- - name : Set up cache
56- uses : actions/cache@v4
57- with :
58- path : /home/runner/.local
59- key : os-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ matrix.sqlalchemy-version }}-${{ hashFiles('**/poetry.lock') }}-poetry-1.6.1
60- - name : Lint
61- run : make lint
62-
63- tests :
64- needs : prepare
5+ lint-and-test :
656 strategy :
667 fail-fast : false
678 matrix :
68- python-version : ["3.8 ", "3.9 ", "3.10 ", "3.11 ", "3.12 "]
9+ python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 ", "3.13 "]
6910 sqlalchemy-version : ["<2.0", "default"]
7011 os : [ubuntu-20.04]
7112 runs-on : ${{ matrix.os }}
@@ -88,13 +29,16 @@ jobs:
8829 - uses : actions/setup-python@v5
8930 with :
9031 python-version : ${{ matrix.python-version }}
91-
92- - name : Set up cache
93- uses : actions/cache@v4
94- with :
95- path : /home/runner/.local
96- key : os-${{ matrix.os }}-python-${{ matrix.python-version }}-${{matrix.sqlalchemy-version }}-${{ hashFiles('**/poetry.lock') }}-poetry-1.6.1
97-
32+ - name : Install and set up Poetry
33+ run : make install-poetry
34+ - name : Install packages
35+ run : make install
36+ - name : Downgrade SQLAlchemy
37+ run : poetry@2.1.2 run pip install -U "sqlalchemy${{ matrix.sqlalchemy-version }}"
38+ - name : Downgrade Flask-SQLAlchemy
39+ run : poetry@2.1.2 run pip install -U "flask-sqlalchemy<3.1"
40+ - name : Lint
41+ run : make lint
9842 - name : Setup PostgreSQL database
9943 run : |
10044 PGPASSWORD=postgres psql -c 'CREATE DATABASE eventsourcing_sqlalchemy;' -U postgres -h localhost
11357 make create-mssql-schema
11458
11559 - name : Print SQLAlchemy version
116- run : poetry run python -c "import sqlalchemy; print(f'Using sqlalchemy {sqlalchemy.__version__}')"
60+ run : poetry@2.1.2 run python -c "import sqlalchemy; print(f'Using sqlalchemy {sqlalchemy.__version__}')"
11761
11862 - name : Run tests
11963 run : make test
0 commit comments