7
7
lint-test :
8
8
runs-on : ubuntu-latest
9
9
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
-
22
10
# Dummy values for required bot environment variables
23
11
BOT_API_KEY : foo
24
12
BOT_SENTRY_DSN : blah
@@ -37,26 +25,10 @@ jobs:
37
25
enable-cache : true
38
26
cache-dependency-glob : " uv.lock"
39
27
activate-environment : true
40
-
28
+
41
29
- name : Install dependencies
42
30
run : uv sync --frozen
43
31
44
- # Check all of our non-dev dependencies are compatible with the MIT license.
45
- # If you added a new dependencies that is being rejected,
46
- # please make sure it is compatible with the license for this project,
47
- # and add it to the ALLOWED_LICENSE variable
48
-
49
- # NOTE: at time of writing pip-licenses is not PEP-639 compliant
50
- # so is not detecting the license for packages now following that style.
51
- # As a temp fix, add packages to the ignore list after manually checking
52
- # that the license in use is compatible with ours.
53
- # Ref: https://github.com/raimon49/pip-licenses/issues/225
54
- - name : Check Dependencies License
55
- run : |
56
- pip-licenses --allow-only="$ALLOWED_LICENSE" \
57
- --ignore-packages attrs \
58
- --package $(uv export --no-hashes --format requirements.txt --no-header --no-annotate | sed "s/==.*//g" | tr "\n" " ")
59
-
60
32
- name : Run pre-commit hooks
61
33
run : SKIP=ruff pre-commit run --all-files
62
34
0 commit comments