|
6 | 6 | lint: |
7 | 7 | name: Run linting & tests |
8 | 8 | runs-on: ubuntu-latest |
9 | | - env: |
10 | | - # List of licenses that are compatible with the MIT License and |
11 | | - # can be used in our project |
12 | | - ALLOWED_LICENSES: Apache Software License; |
13 | | - BSD; BSD License; |
14 | | - GNU Library or Lesser General Public License (LGPL); |
15 | | - Historical Permission Notice and Disclaimer (HPND); |
16 | | - ISC License (ISCL); |
17 | | - MIT License; |
18 | | - Mozilla Public License 2.0 (MPL 2.0); |
19 | | - Public Domain; |
20 | | - Python Software Foundation License |
21 | 9 |
|
22 | 10 | steps: |
23 | 11 | - name: Checkout repository |
24 | 12 | uses: actions/checkout@v4 |
25 | 13 |
|
26 | | - - name: Install Python Dependencies |
27 | | - uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0 |
| 14 | + - name: Install uv |
| 15 | + uses: astral-sh/setup-uv@v6 |
28 | 16 | with: |
29 | | - python_version: "3.13" |
| 17 | + enable-cache: true |
| 18 | + cache-dependency-glob: "uv.lock" |
| 19 | + activate-environment: true |
30 | 20 |
|
31 | | - # Check all of our dev dependencies are compatible with the MIT license. |
32 | | - # If you added a new dependencies that is being rejected, |
33 | | - # please make sure it is compatible with the license for this project, |
34 | | - # and add it to the ALLOWED_LICENSE variable |
35 | | - - name: Check Dependencies License |
36 | | - run: | |
37 | | - poetry self add poetry-plugin-export |
38 | | - pip-licenses --allow-only="$ALLOWED_LICENSE" \ |
39 | | - --package $(poetry export -f requirements.txt --without-hashes | sed "s/==.*//g" | tr "\n" " ") |
| 21 | + - name: Install dependencies |
| 22 | + run: uv sync --frozen |
40 | 23 |
|
41 | 24 | # Attempt to run the bot. Setting `IN_CI` to true, so bot.run() is never called. |
42 | 25 | # This is to catch import and cog setup errors that may appear in PRs, to avoid crash loops if merged. |
|
0 commit comments