This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env python
2
+ import sys
3
+
4
+ if sys .version_info < (3 , 11 ):
5
+ raise RuntimeError ("Requires at least Python 3.11, to import tomllib" )
6
+
7
+ import tomllib
8
+
9
+ with open ("poetry.lock" , "rb" ) as f :
10
+ lockfile = tomllib .load (f )
11
+
12
+ try :
13
+ lock_version = lockfile ["metadata" ]["lock-version" ]
14
+ assert lock_version == "2.0"
15
+ except Exception :
16
+ print (
17
+ """\
18
+ Lockfile is not version 2.0. You probably need to upgrade poetry on your local box
19
+ and re-run `poetry lock --no-update`. See the Poetry cheat sheet at
20
+ https://matrix-org.github.io/synapse/develop/development/dependencies.html
21
+ """
22
+ )
23
+ raise
Original file line number Diff line number Diff line change 51
51
- run : " pip install 'click==8.1.1' 'GitPython>=3.1.20'"
52
52
- run : scripts-dev/check_schema_delta.py --force-colors
53
53
54
+ check-lockfile :
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - uses : actions/checkout@v3
58
+ - uses : actions/setup-python@v4
59
+ with :
60
+ python-version : " 3.x"
61
+ - run : .ci/scripts/check_lockfile.py
54
62
lint :
55
63
uses : " matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v2"
56
64
with :
@@ -163,6 +171,7 @@ jobs:
163
171
- lint-pydantic
164
172
- check-sampleconfig
165
173
- check-schema-delta
174
+ - check-lockfile
166
175
- lint-clippy
167
176
- lint-rustfmt
168
177
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments