Skip to content

Commit

Permalink
Stabilise third party tests (#348)
Browse files Browse the repository at this point in the history
Use uv to test with the state of PyPI as of the commit we are testing
  • Loading branch information
hauntsaninja authored Mar 7, 2024
1 parent c3dc681 commit 3304a5f
Showing 1 changed file with 34 additions and 17 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/third_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,16 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install typing_inspect test dependencies
run: pip install -r typing_inspect/test-requirements.txt
run: |
cd typing_inspect
uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
- name: Install typing_extensions latest
run: pip install ./typing-extensions-latest
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
- name: List all installed dependencies
run: pip freeze --all
run: uv pip freeze
- name: Run typing_inspect tests
run: |
cd typing_inspect
Expand Down Expand Up @@ -147,12 +151,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install pyanalyze test requirements
run: pip install ./pyanalyze[tests]
run: |
cd pyanalyze
uv pip install --system 'pyanalyze[tests] @ .' --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
- name: Install typing_extensions latest
run: pip install ./typing-extensions-latest
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
- name: List all installed dependencies
run: pip freeze --all
run: uv pip freeze
- name: Run pyanalyze tests
run: |
cd pyanalyze
Expand Down Expand Up @@ -191,12 +199,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install typeguard test requirements
run: pip install -e ./typeguard[test]
run: |
cd typeguard
uv pip install --system "typeguard[test] @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
- name: Install typing_extensions latest
run: pip install ./typing-extensions-latest
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
- name: List all installed dependencies
run: pip freeze --all
run: uv pip freeze
- name: Run typeguard tests
run: |
cd typeguard
Expand Down Expand Up @@ -234,6 +246,8 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Configure git for typed-argument-parser tests
# typed-argument parser does this in their CI,
# and the tests fail unless we do this
Expand All @@ -242,12 +256,13 @@ jobs:
git config --global user.name "Your Name"
- name: Install typed-argument-parser test requirements
run: |
pip install -e ./typed-argument-parser
pip install pytest
cd typed-argument-parser
uv pip install --system "typed-argument-parser @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
uv pip install --system pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
- name: Install typing_extensions latest
run: pip install ./typing-extensions-latest
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
- name: List all installed dependencies
run: pip freeze --all
run: uv pip freeze
- name: Run typed-argument-parser tests
run: |
cd typed-argument-parser
Expand Down Expand Up @@ -286,15 +301,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install mypy test requirements
run: |
cd mypy
pip install -r test-requirements.txt
pip install -e .
uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
uv pip install --system -e .
- name: Install typing_extensions latest
run: pip install ./typing-extensions-latest
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
- name: List all installed dependencies
run: pip freeze --all
run: uv pip freeze
- name: Run stubtest & mypyc tests
run: |
cd mypy
Expand Down

0 comments on commit 3304a5f

Please sign in to comment.