66 branches :
77 - main
88
9+ concurrency :
10+ group : test-${{ github.head_ref }}
11+ cancel-in-progress : true
12+
13+
914jobs :
1015 validate :
1116 runs-on : ubuntu-latest
1217 steps :
1318 - uses : actions/checkout@v4
1419
15- - uses : actions/setup-python@v5
16- with :
17- python-version : " 3.11"
20+ - name : Install uv
21+ uses : astral-sh/setup-uv@v6
22+
23+ - name : Set up Python
24+ run : uv python install 3.12
25+
26+ - name : Create virtual environment
27+ run : uv sync --all-extras --dev
1828
19- - name : Install Pre-Commit
20- run : python -m pip install pre-commit && pre-commit install
29+ - name : Install Pre-Commit hooks
30+ run : uv run pre-commit install
2131
2232 - name : Load cached Pre-Commit Dependencies
2333 id : cached-pre-commit-dependencies
@@ -27,32 +37,102 @@ jobs:
2737 key : pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
2838
2939 - name : Execute Pre-Commit
30- run : pre-commit run --show-diff-on-failure --color=always --all-files
40+ run : uv run pre-commit run --show-diff-on-failure --color=always --all-files
41+ mypy :
42+ runs-on : ubuntu-latest
43+ steps :
44+ - uses : actions/checkout@v4
3145
32- test :
46+ - name : Install uv
47+ uses : astral-sh/setup-uv@v6
48+
49+ - name : Set up Python
50+ run : uv python install 3.13
51+
52+ - name : Install dependencies
53+ run : uv sync --all-extras --dev
54+
55+ - name : Run mypy
56+ run : uv run mypy
57+
58+ pyright :
59+ runs-on : ubuntu-latest
60+ steps :
61+ - uses : actions/checkout@v4
62+
63+ - name : Install uv
64+ uses : astral-sh/setup-uv@v6
65+
66+ - name : Set up Python
67+ run : uv python install 3.13
68+
69+ - name : Install dependencies
70+ run : uv sync --all-extras --dev
71+
72+ - name : Run pyright
73+ run : uv run pyright
74+
75+ # # TODO(cofin)
76+ # # AttributeError: 'SuiteRequirements' object has no attribute 'computed_reflects_normally'
77+ slotscheck :
3378 runs-on : ubuntu-latest
79+ steps :
80+ - uses : actions/checkout@v4
81+
82+ - name : Install uv
83+ uses : astral-sh/setup-uv@v6
84+
85+ - name : Set up Python
86+ run : uv python install 3.13
87+
88+ - name : Install dependencies
89+ run : uv sync --all-extras --dev
90+
91+ test :
92+ name : " test (${{ matrix.python-version }}"
3493 strategy :
3594 fail-fast : true
3695 matrix :
37- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
38- timeout-minutes : 30
39- defaults :
40- run :
41- shell : bash
96+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
97+ uses : ./.github/workflows/test.yml
98+ with :
99+ coverage : ${{ matrix.python-version == '3.13' }}
100+ python-version : ${{ matrix.python-version }}
101+ codecov :
102+ needs :
103+ - test
104+ - validate
105+ runs-on : ubuntu-latest
106+ permissions :
107+ security-events : write
42108 steps :
43- - name : Check out repository
44- uses : actions/checkout@v4
109+ - uses : actions/checkout@v4
110+ - uses : actions/setup-python@v5
111+ with :
112+ python-version : " 3.13"
45113
46- - uses : pdm-project/setup-pdm@v4
47- name : Set up PDM
114+ - name : Download Artifacts
115+ uses : actions/download-artifact@v4
48116 with :
49- python-version : ${{ matrix.python-version }}
117+ name : coverage-xml
118+ path : coverage.xml
119+ merge-multiple : true
50120
51- - name : Install dependencies
52- run : pdm install
121+ # - name: Combine coverage files
122+ # run: |
123+ # python -Im pip install coverage covdefaults
124+ # python -Im coverage combine
125+ # python -Im coverage xml -i
53126
54- - name : Test
55- run : pdm run pytest -m ""
127+ # - name: Fix coverage file name
128+ # run: sed -i "s/home\/runner\/work\/advanced-alchemy\/advanced-alchemy/github\/workspace/g" coverage.xml
129+
130+ - name : Upload coverage reports to Codecov
131+ uses : codecov/codecov-action@v5
132+ with :
133+ files : coverage.xml
134+ token : ${{ secrets.CODECOV_TOKEN }}
135+ slug : litestar-org/litestar-asyncpg
56136
57137 build-docs :
58138 needs :
@@ -63,26 +143,26 @@ jobs:
63143 - name : Check out repository
64144 uses : actions/checkout@v4
65145
66- - name : Set up Python
67- uses : actions/setup-python@v5
68- with :
69- python-version : " 3.11"
146+ - name : Install uv
147+ uses : astral-sh/setup-uv@v6
70148
71- - uses : pdm-project/setup-pdm@v4
72- name : Set up PDM
73- with :
74- python-version : " 3.11"
149+ - name : Set up Python
150+ run : uv python install 3.13
75151
76152 - name : Install dependencies
77- run : pdm install -G: all
153+ run : uv sync -- all-extras --dev
78154
79155 - name : Build docs
80- run : pdm run make docs
156+ run : uv run make docs
81157
82- - name : Save PR number
158+ - name : Check docs links
83159 env :
84- PR_NUMBER : ${{ github.event.number }}
85- run : echo $PR_NUMBER > .pr_number
160+ LITESTAR_DOCS_IGNORE_MISSING_EXAMPLE_OUTPUT : 1
161+ run : uv run make docs-linkcheck
162+
163+ - name : Save PR number
164+ run : |
165+ echo "${{ github.event.number }}" > .pr_number
86166
87167 - name : Upload artifact
88168 uses : actions/upload-artifact@v4
91171 path : |
92172 docs/_build/html
93173 .pr_number
174+ include-hidden-files : true
0 commit comments