77 lint-test :
88 runs-on : ubuntu-latest
99 env :
10- # List of licenses that are compatible with the MIT License and
11- # can be used in our project
12- ALLOWED_LICENSE : Apache Software License;
13- BSD License;
14- GNU Library or Lesser General Public License (LGPL);
15- ISC License (ISCL);
16- MIT License;
17- Mozilla Public License 2.0 (MPL 2.0);
18- Public Domain;
19- Python Software Foundation License;
20- The Unlicense (Unlicense)
21-
2210 # Dummy values for required bot environment variables
2311 BOT_API_KEY : foo
2412 BOT_SENTRY_DSN : blah
@@ -31,27 +19,15 @@ jobs:
3119 - name : Checkout repository
3220 uses : actions/checkout@v4
3321
34- - name : Install Python Dependencies
35- uses : HassanAbouelela/actions/ setup-python@setup-python_v1.6.0
22+ - name : Install uv
23+ uses : astral-sh/ setup-uv@v6
3624 with :
37- python_version : ' 3.12'
38-
39- # Check all of our non-dev dependencies are compatible with the MIT license.
40- # If you added a new dependencies that is being rejected,
41- # please make sure it is compatible with the license for this project,
42- # and add it to the ALLOWED_LICENSE variable
25+ enable-cache : true
26+ cache-dependency-glob : " uv.lock"
27+ activate-environment : true
4328
44- # NOTE: at time of writing pip-licenses is not PEP-639 compliant
45- # so is not detecting the license for packages now following that style.
46- # As a temp fix, add packages to the ignore list after manually checking
47- # that the license in use is compatible with ours.
48- # Ref: https://github.com/raimon49/pip-licenses/issues/225
49- - name : Check Dependencies License
50- run : |
51- poetry self add poetry-plugin-export
52- pip-licenses --allow-only="$ALLOWED_LICENSE" \
53- --ignore-packages attrs \
54- --package $(poetry export -f requirements.txt --without-hashes | sed "s/==.*//g" | tr "\n" " ")
29+ - name : Install dependencies
30+ run : uv sync --frozen
5531
5632 - name : Run pre-commit hooks
5733 run : SKIP=ruff pre-commit run --all-files
0 commit comments