Skip to content
62 changes: 21 additions & 41 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
Comment thread
blink1073 marked this conversation as resolved.
with:
enable-cache: true
python-version: "3.10"
# Runs before the install so a stale lock fails in seconds rather than
# after the build and typecheck.
- name: Check lockfile is up to date
run: |
uv lock --check
- name: Install just
run: uv tool install rust-just
- name: Install Python dependencies
run: |
just install
Expand Down Expand Up @@ -82,10 +79,10 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
with:
enable-cache: true
# The beta Python here relies on the action's prerelease default.
python-version: ${{ matrix.python-version }}
- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
Expand All @@ -104,17 +101,14 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
with:
enable-cache: true
python-version: "3.10"
- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: "8.0"
- name: Install just
run: uv tool install rust-just
- name: Setup tests
run: COVERAGE=1 just setup-tests
- name: Run tests
Expand All @@ -132,19 +126,16 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
with:
enable-cache: true
python-version: "3.10"
- name: Install just
run: uv tool install rust-just
- name: Install dependencies
run: just install
- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: "8.0"
- name: Install dependencies
run: just install
- name: Run tests
run: |
just setup-tests doctest
Expand All @@ -157,13 +148,10 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
with:
enable-cache: true
python-version: "3.10"
- name: Install just
run: uv tool install rust-just
- name: Install dependencies
run: just install
- name: Build docs
Expand All @@ -179,16 +167,12 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
with:
enable-cache: true
python-version: "${{matrix.python}}"
- name: Install just
run: uv tool install rust-just
- name: Install dependencies
run: |
just install
run: just install
- name: Run typecheck
run: |
just typing
Expand All @@ -200,16 +184,12 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed
with:
enable-cache: true
python-version: "3.10"
- name: Install just
run: uv tool install rust-just
- name: Install dependencies
run: |
just install
run: just install
- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
- name: Run tests
Expand Down Expand Up @@ -290,8 +270,8 @@
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install Python tooling
uses: mongodb-labs/drivers-github-tools/python/setup@v3
Comment thread
blink1073 marked this conversation as resolved.
Dismissed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job manages its own venv but the action sets UV_PYTHON to an absolute interpreter path which takes precedence over the activated VIRTUAL_ENV so uv pip install now targets the setup-python interpreter instead of the .venv.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I'll fix this upstream in github-tools, PR coming soon

with:
python-version: "3.9"
- id: setup-mongodb
Expand Down
Loading