manual tweak to core #2113
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
name: test stub quality | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- "**.md" | |
- "docs/**" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "docs/**" | |
- "test/**" | |
env: | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
STABLE_STUB_VERSION: v1_19_1 | |
LATEST_STUB_VERSION: latest | |
jobs: | |
pyright-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout stubs repo | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: "pip" | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade wheel | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Testspace client install & config | |
uses: testspace-com/setup-testspace@v1 | |
with: | |
domain: josverl | |
# domain: ${{github.repository_owner}} | |
# dummy pytest | |
- name: run pytest | |
run: | | |
pytest ./tests --junitxml=./results/results.xml | |
- name: run pyright on stubs | |
if: always() | |
run: | | |
# TODO: automatically Find Stable = latest released version | |
pyright --version | tee ./results/pyright-version.log | |
pyright stubs | tee ./results/pyright-all-stubs.log | |
pyright stubs/micropython-${STABLE_STUB_VERSION}-* | tee ./results/pyright-stable.log | |
pyright stubs/micropython-{LATEST_STUB_VERSION}-* | tee ./results/pyright-latest.log | |
- name: Fixup pyright logs | |
shell: pwsh | |
run: | | |
./tests/fix-pyrightlogs.ps1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: pyright | |
path: ./results/pyright-*.log | |
- name: Testspace push test content | |
run: | | |
testspace "[all-stubs]./results/pyright-all-stubs.log{lint}" ./results/results.xml | |
testspace "[stable]./results/pyright-stable.log{lint}" | |
testspace "[latest]./results/pyright-latest.log{lint}" | |
testspace "./results/pyright-version.log" |