File tree Expand file tree Collapse file tree 10 files changed +513
-18
lines changed
Expand file tree Collapse file tree 10 files changed +513
-18
lines changed Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- python-version : ["3.11 "]
14+ python-version : ["3.12 "]
1515 steps :
1616 - if : github.event_name != 'pull_request'
1717 uses : actions/checkout@v6
@@ -23,18 +23,22 @@ jobs:
2323 uses : actions/setup-python@v6
2424 with :
2525 python-version : ${{ matrix.python-version }}
26+ - name : Install uv
27+ uses : astral-sh/setup-uv@v5
28+ - name : Setup venv
29+ run : |
30+ uv venv
2631 - name : Install dependencies
2732 run : |
28- python -m pip install --upgrade pip
29- pip install -r requirements.txt
30- pip install -r requirements_dev.txt
33+ uv pip sync pylock.toml
3134 - name : Formatting the code with Black
3235 run : |
33- black $(git ls-files '*.py')
36+ uv run black $(git ls-files '*.py')
3437 - name : Git config
3538 run : |
3639 git config --local user.name "github-actions[bot]"
3740 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
41+ git config --local advice.addIgnoredFile false
3842 - name : Git diff
3943 run : |
4044 git diff HEAD || true
Original file line number Diff line number Diff line change 1+ name : Python dependencies
2+
3+ on :
4+ pull_request :
5+ push :
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == true
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : ["3.12"]
15+ steps :
16+ - if : github.event_name != 'pull_request'
17+ uses : actions/checkout@v6
18+ - if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
19+ uses : actions/checkout@v6
20+ with :
21+ ref : ${{ github.event.pull_request.head.ref }}
22+ - name : Set up Python ${{ matrix.python-version }}
23+ uses : actions/setup-python@v6
24+ with :
25+ python-version : ${{ matrix.python-version }}
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install -r requirements.txt
30+ pip install -r requirements_dev.txt
31+ pip install -e .[dev]
Original file line number Diff line number Diff line change @@ -11,18 +11,21 @@ jobs:
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- python-version : ["3.11", "3. 12"]
14+ python-version : ["3.12"]
1515 steps :
1616 - uses : actions/checkout@v6
1717 - name : Set up Python ${{ matrix.python-version }}
1818 uses : actions/setup-python@v6
1919 with :
2020 python-version : ${{ matrix.python-version }}
21+ - name : Install uv
22+ uses : astral-sh/setup-uv@v5
23+ - name : Setup venv
24+ run : |
25+ uv venv
2126 - name : Install dependencies
2227 run : |
23- python -m pip install --upgrade pip
24- pip install -r requirements.txt
25- pip install -r requirements_dev.txt
28+ uv pip sync pylock.toml
2629 - name : Analysing the code with Pylint
2730 run : |
28- pylint $(git ls-files '*.py')
31+ uv run pylint $(git ls-files '*.py')
Original file line number Diff line number Diff line change @@ -11,18 +11,23 @@ jobs:
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- python-version : ["3.11", "3. 12"]
14+ python-version : ["3.12"]
1515 steps :
1616 - uses : actions/checkout@v6
1717 - name : Set up Python ${{ matrix.python-version }}
1818 uses : actions/setup-python@v6
1919 with :
2020 python-version : ${{ matrix.python-version }}
21+ - name : Install uv
22+ uses : astral-sh/setup-uv@v5
23+ - name : Setup venv
24+ run : |
25+ uv venv
2126 - name : Install dependencies
2227 run : |
23- python -m pip install --upgrade pip
24- pip install -r requirements.txt
25- pip install -r requirements_dev.txt
28+ uv pip sync pylock.toml
29+ uv pip install -e .[dev]
2630 - name : Analysing the code with Python unittest
2731 run : |
28- python -m unittest $(git ls-files 'cog/tests/*.py')
32+ uv run python -m unittest $(git ls-files 'cog/tests/*.py')
33+ uv run python -m unittest $(git ls-files 'tests/unittest/*.py')
Original file line number Diff line number Diff line change 1313** /__pycache__
1414* .egg-info /
1515build /lib /
16+ # # uv
17+ uv.lock
1618# # Linux
1719flakLog.out
1820nohup.out
You can’t perform that action at this time.
0 commit comments