mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Run stub_uploader tests in CI (#8794)
This commit is contained in:
33
.github/workflows/daily.yml
vendored
33
.github/workflows/daily.yml
vendored
@@ -58,12 +58,35 @@ jobs:
|
||||
- name: Run stubtest
|
||||
run: xvfb-run python tests/stubtest_third_party.py --num-shards 4 --shard-index ${{ matrix.shard-index }}
|
||||
|
||||
stub-uploader:
|
||||
name: Run the stub_uploader tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout typeshed
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: typeshed
|
||||
- name: Checkout stub_uploader
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: typeshed-internal/stub_uploader
|
||||
path: stub_uploader
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd stub_uploader
|
||||
pip install -r requirements.txt
|
||||
python -m pytest tests
|
||||
|
||||
# https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
|
||||
create-issue-on-failure:
|
||||
name: Create an issue if stubtest failed
|
||||
name: Create an issue if daily tests failed
|
||||
runs-on: ubuntu-latest
|
||||
needs: [stubtest-stdlib, stubtest-third-party]
|
||||
if: ${{ github.repository == 'python/typeshed' && always() && (needs.stubtest-stdlib.result == 'failure' || needs.stubtest-third-party.result == 'failure') }}
|
||||
needs: [stubtest-stdlib, stubtest-third-party, stub-uploader]
|
||||
if: ${{ github.repository == 'python/typeshed' && always() && (needs.stubtest-stdlib.result == 'failure' || needs.stubtest-third-party.result == 'failure' || needs.stub-uploader.result == 'failure') }}
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
@@ -74,7 +97,7 @@ jobs:
|
||||
await github.rest.issues.create({
|
||||
owner: "python",
|
||||
repo: "typeshed",
|
||||
title: `Stubtest failed on ${new Date().toDateString()}`,
|
||||
body: "Stubtest runs are listed here: https://github.com/python/typeshed/actions/workflows/daily.yml",
|
||||
title: `Daily tests failed on ${new Date().toDateString()}`,
|
||||
body: "Runs listed here: https://github.com/python/typeshed/actions/workflows/daily.yml",
|
||||
labels: ["help wanted"],
|
||||
})
|
||||
|
||||
25
.github/workflows/tests.yml
vendored
25
.github/workflows/tests.yml
vendored
@@ -93,7 +93,7 @@ jobs:
|
||||
- run: python ./tests/regr_test.py --all
|
||||
|
||||
pyright:
|
||||
name: Test the stubs with pyright
|
||||
name: Test typeshed with pyright
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -125,6 +125,29 @@ jobs:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
no-comments: ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
|
||||
|
||||
stub-uploader:
|
||||
name: Run the stub_uploader tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout typeshed
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: typeshed
|
||||
- name: Checkout stub_uploader
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: typeshed-internal/stub_uploader
|
||||
path: stub_uploader
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd stub_uploader
|
||||
pip install -r requirements.txt
|
||||
python -m pytest tests
|
||||
|
||||
stubtest-third-party:
|
||||
name: Check third party stubs with stubtest
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
Reference in New Issue
Block a user