Skip to content

bump versions

bump versions #2087

Workflow file for this run

# 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
# - push coverage result to Testspace server
# - upload artifacts from the results folder
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
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:
JUPYTER_PLATFORM_DIRS: "1"
# fix: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
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.8", "3.9", "3.10", "3.11", "3.12"]
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.
- uses: testspace-com/setup-testspace@v1
continue-on-error: true
with:
domain: josverl
#----------------------------------------------
# poetry is not in the default image
#----------------------------------------------
- name: Install poetry
run: pipx install poetry==1.3.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 coverage erase
poetry run coverage run -m pytest -m stubber --durations=50
#----------------------------------------------
# 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@v4
with:
file: results/coverage-stubber-${{ matrix.python-version }}-${{ matrix.os }}.xml
flags: stubber
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
#----------------------------------------------
- name: Push result to Testspace server
if: always() # ignore errors
continue-on-error: true
run: |
testspace [tests/${{ matrix.os }}/Python_${{ matrix.python-version }}]results/*.xml --link codecov
- uses: actions/upload-artifact@v4
if: always() # ignore errors
continue-on-error: true
with:
path: results/
name: results-stubber-${{ matrix.python-version }}-${{ matrix.os }}