Add stub location summary at completion #2340
Workflow file for this run
This file contains hidden or 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
| # This workflow will : | |
| # - test the workstation scripts | |
| # - test the createstubs on multiple micropyton linux versions | |
| # - test the minified createstubs on multiple micropyton linux versions | |
| # - upload coverage stats to Codecov | |
| name: pytest stubber | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| # branches: [main] | |
| push: | |
| branches: [main, stubber/*, feat/*, fix/*] | |
| paths: | |
| - .github/workflows/pytest.yml | |
| - .github/workflows/codecov.yml | |
| - "src/stubber/**" | |
| - "tests/**" | |
| - "**/pyproject.toml" | |
| - "**/poetry.lock" | |
| env: | |
| PYTHONIOENCODING: utf-8 | |
| # fix: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs | |
| JUPYTER_PLATFORM_DIRS: "1" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_stubber: | |
| name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-13] | |
| python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| # mpflash-version: ["beta"] | |
| include: # for testing | |
| - os: windows-latest | |
| python-version: "3.11" | |
| - os: ubuntu-latest | |
| python-version: "3.11" | |
| - os: macos-13 | |
| python-version: "3.11" | |
| # - os: flyci-macos-large-latest-m2 # fails on pipx | |
| # python-version: "3.11" | |
| # - os: macos-latest-large # Paid | |
| # python-version: "3.11" | |
| # - os: macos-13-xlarge # Paid | |
| # python-version: "3.11" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Number of commits to fetch. 0 indicates all history for all branches and tags. | |
| #---------------------------------------------- | |
| # poetry is not in the default image | |
| #---------------------------------------------- | |
| - name: Install poetry | |
| run: pipx install poetry==2.1 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # cache: "poetry" | |
| #---------------------------------------------- | |
| # install project | |
| #---------------------------------------------- | |
| - name: Install test dependencies | |
| run: | | |
| poetry install --with test | |
| # use the latest source version of mpflash | |
| # - name: update mpflash to beta for testing | |
| # if: ${{ matrix.mpflash-version == 'beta' }} | |
| # run: | | |
| # # use poetry's environmnt | |
| # poetry run pip uninstall mpflash -y | |
| # poetry run pip install src/mpflash | |
| #---------------------------------------------- | |
| # stubber clone | |
| # repos needed for tests | |
| #---------------------------------------------- | |
| - name: stubber clone | |
| run: poetry run stubber clone --add-stubs | |
| - name: Test stubber | |
| run: | | |
| poetry run pytest --cov --cov-branch --cov-report=xml | |
| #---------------------------------------------- | |
| # upload coverage stats | |
| # .XML to Codecov | |
| #---------------------------------------------- | |
| - name: create coverage report | |
| if: always() | |
| continue-on-error: true | |
| run: | | |
| poetry run coverage xml -o results/coverage-stubber-${{ matrix.python-version }}-${{ matrix.os }}.xml | |
| - name: Upload coverage-stubber-*.xml to Codecov | |
| if: always() # ignore errors | |
| continue-on-error: true | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| #---------------------------------------------- | |
| # - uses: actions/upload-artifact@v4 | |
| # if: always() # ignore errors | |
| # continue-on-error: true | |
| # with: | |
| # path: results/ | |
| # name: results-stubber-${{ matrix.python-version }}-${{ matrix.os }} |