Skip to content

Add SQLAlchemy to third-party daily tests #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 27, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/third_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,49 @@ jobs:
- name: Run cattrs tests
run: cd cattrs; pdm run pytest tests

sqlalchemy:
name: sqlalchemy tests
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
# PyPy is deliberately omitted here, since SQLAlchemy's tests
# fail on PyPy for reasons unrelated to typing_extensions.
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
# sqlalchemy tests fail when using the Ubuntu 24.04 runner
# https://github.com/sqlalchemy/sqlalchemy/commit/8d73205f352e68c6603e90494494ef21027ec68f
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Checkout sqlalchemy
run: git clone --depth=1 https://github.com/sqlalchemy/sqlalchemy.git || git clone --depth=1 https://github.com/sqlalchemy/sqlalchemy.git
- name: Checkout typing_extensions
uses: actions/checkout@v4
with:
path: typing-extensions-latest
- name: Install test dependencies
run: |
cd sqlalchemy
uv add --editable ../typing-extensions-latest
uv add tox setuptools
uv sync
- name: List installed dependencies
# Note: additional dependencies are installed when running tox below
run: cd sqlalchemy; uv pip list
- name: Run sqlalchemy tests
run: |
cd sqlalchemy
uv run tox -e github-nocext -- -q --nomemory --notimingintensive
env:
TOX_WORKERS: -n4
Copy link
Collaborator

Choose a reason for hiding this comment

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

As this seems to be the default anyway, I'd prefer to leave this out and let SQLAlchemy decide what's best here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! I added it explicitly to match what run-tests.yaml does, but you're right that the same default gets set in tox anyway. It makes to sense to defer to SQLAlchemy sets to, especially if it ever changes in the future

Copy link

@CaselIT CaselIT Mar 27, 2025

Choose a reason for hiding this comment

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

IIRC it's there because historically it was 2 since the actions had 2 cpus available, but then migrated to 4.

I'll likely also remove it from the ci file definition in sqlalchemy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense, thanks for the context!


create-issue-on-failure:
name: Create an issue if daily tests failed
runs-on: ubuntu-latest
Expand All @@ -312,6 +355,7 @@ jobs:
- typed-argument-parser
- mypy
- cattrs
- sqlalchemy

if: >-
${{
Expand All @@ -326,6 +370,7 @@ jobs:
|| needs.typed-argument-parser.result == 'failure'
|| needs.mypy.result == 'failure'
|| needs.cattrs.result == 'failure'
|| needs.sqlalchemy.result == 'failure'
)
}}

Expand Down
Loading