-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use uv to install dependencies (#10507)
* ci: use uv to install dependencies * split Windows tests into four for each python versions * split tests and check into two jobs * increase timeout
- Loading branch information
Showing
6 changed files
with
2,888 additions
and
27 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,68 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
lint: | ||
timeout-minutes: 10 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- uses: hynek/setup-cached-uv@v2 | ||
with: | ||
cache-dependency-path: pyproject.toml | ||
- run: uv pip install -e ".[dev]" --system | ||
env: | ||
UV_LINK_MODE: ${{ runner.os == 'Windows' && 'symlink' || 'hardlink' }} | ||
|
||
- name: Cache mypy | ||
uses: actions/cache@v4 | ||
with: | ||
path: .mypy_cache | ||
key: mypy-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} | ||
- uses: pre-commit/[email protected] | ||
|
||
tests: | ||
timeout-minutes: 50 | ||
timeout-minutes: 20 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, windows-latest, macos-latest] | ||
os: [ubuntu-latest, macos-latest] | ||
pyv: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
include: | ||
- os: windows-latest | ||
pyv: "3.9" | ||
pytestargs: "--splits 4 --group 1" | ||
- os: windows-latest | ||
pyv: "3.9" | ||
pytestargs: "--splits 4 --group 2" | ||
- os: windows-latest | ||
pyv: "3.9" | ||
pytestargs: "--splits 4 --group 3" | ||
- os: windows-latest | ||
pyv: "3.9" | ||
pytestargs: "--splits 4 --group 4" | ||
- os: windows-latest | ||
pyv: "3.12" | ||
pytestargs: "--splits 4 --group 1" | ||
- os: windows-latest | ||
pyv: "3.12" | ||
pytestargs: "--splits 4 --group 2" | ||
- os: windows-latest | ||
pyv: "3.12" | ||
pytestargs: "--splits 4 --group 3" | ||
- os: windows-latest | ||
pyv: "3.12" | ||
pytestargs: "--splits 4 --group 4" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -33,20 +86,20 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.pyv }} | ||
cache: pip | ||
- uses: hynek/setup-cached-uv@v2 | ||
with: | ||
cache-dependency-path: pyproject.toml | ||
- name: install | ||
run: | | ||
pip install --upgrade pip wheel | ||
pip install -e ".[dev]" | ||
- uses: pre-commit/[email protected] | ||
- run: uv pip install -e ".[dev]" pytest-split --system | ||
env: | ||
UV_LINK_MODE: ${{ runner.os == 'Windows' && 'symlink' || 'hardlink' }} | ||
|
||
- name: run tests | ||
timeout-minutes: 40 | ||
env: | ||
PYTHONUTF8: 1 | ||
run: > | ||
pytest -n=logical --timeout=300 --durations=100 | ||
--cov --cov-report=xml --cov-report=term | ||
pytest ${{ matrix.pytestargs }} -n=logical --timeout=300 --durations=0 | ||
--cov --cov-report=xml --cov-report=term --durations-path=./.github/.test_durations | ||
- name: upload coverage report | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters