Skip to content

build(deps): bump typing-extensions from 4.12.2 to 4.15.0 #2706

build(deps): bump typing-extensions from 4.12.2 to 4.15.0

build(deps): bump typing-extensions from 4.12.2 to 4.15.0 #2706

Workflow file for this run

name: Check Python Code
on:
pull_request:
permissions:
pull-requests: write # needed for thollander/actions-comment-pull-request
jobs:
check-change-log-fragment:
runs-on: ubuntu-latest
steps:
- name: Generate token
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check for changelog fragment
id: check_changelog
run: |
if [[ -n "$(git diff --name-only --diff-filter=A HEAD^1 HEAD -- changelog.d/*.md)" ]]; then
echo "has_changelog=true" >> $GITHUB_OUTPUT
else
echo "has_changelog=false" >> $GITHUB_OUTPUT
fi
- name: Delete existing comment if changelog fragment was added
if: steps.check_changelog.outputs.has_changelog == 'true'
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: no_changelog_fragment_detected
mode: delete
github-token: ${{ steps.app_token.outputs.token }}
- name: Create or update comment if no changelog fragment
if: steps.check_changelog.outputs.has_changelog == 'false'
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: no_changelog_fragment_detected
mode: upsert
message: ⚠️ No changelog fragment detected
github-token: ${{ steps.app_token.outputs.token }}
summarize-size:
runs-on: ubuntu-latest
steps:
- name: Generate token
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
- name: Generate comment
run: poe -q size_diff --before=origin/${{ github.base_ref }} 1>sizes.md
- name: Upsert diff summary comment
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: size_diff_summary
mode: upsert
file-path: sizes.md
github-token: ${{ steps.app_token.outputs.token }}
check-python:
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
with:
uv_sync_args: "--group cicd --group doc"
- name: Check pre-commits
run: pre-commit run --all-files && git diff --exit-code
- name: Check generated code
run: poe gen && git diff --exit-code
- name: Check documentation
run: poe docs
- name: Check compiler wheel can be built
run: uv build --wheel
- name: Check stubs wheel can be built
run: uv build --wheel
working-directory: stubs
tests:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
group: [ 1, 2 ]
module: [ 'localnet', 'not localnet' ]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
with:
uv_sync_args: "--group cicd"
- name: Start LocalNet
if: ${{ matrix.module == 'localnet' }}
run: algokit localnet start
- name: pytest
shell: bash # sets pipefail etc
run: pytest --cov --splits 2 -m "${{ matrix.module }}" --group ${{ matrix.group }} --junitxml=pytest-junit.xml
env:
COVERAGE_CORE: sysmon
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage${{ matrix.group }}${{ matrix.module }}
path: .coverage
if-no-files-found: error
include-hidden-files: true
- name: Upload junit
uses: actions/upload-artifact@v4
with:
name: junit${{ matrix.group }}${{ matrix.module }}
path: pytest-junit.xml
if-no-files-found: error
tests-windows:
runs-on: "windows-latest"
strategy:
fail-fast: false
matrix:
group: [ 1, 2 ]
# skip localnet tests for now, problems starting Docker containers on Windows:
# docker: no matching manifest for windows/amd64 10.0.26100 in the manifest list entries
module: [ 'not localnet' ]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
with:
uv_sync_args: "--group cicd"
- name: Start LocalNet
if: ${{ matrix.module == 'localnet' }}
run: algokit localnet start
- name: pytest
shell: bash # sets pipefail etc
run: pytest --splits 2 -m "${{ matrix.module }}" --group ${{ matrix.group }}
coverage:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Generate token
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
# needed for coverage report
- name: Checkout source code
uses: actions/checkout@v4
- name: Download all coverage artifacts
uses: actions/download-artifact@v4
with:
pattern: coverage*
- name: Download all jUnit artifacts
uses: actions/download-artifact@v4
with:
pattern: junit*
- name: Combine coverage
run: |
uv tool install 'coverage[toml]'
uv tool install junitparser
# merge coverage reports from all tests
coverage combine coverage*/.coverage*
junitparser merge --glob junit*/pytest-junit.xml pytest-junit.xml
# coverage report output differs slightly from what comment action expects
# so append expected title
echo coverage: platform > pytest-coverage.txt
coverage report | tee -a pytest-coverage.txt
- name: pytest coverage comment
continue-on-error: true # forks fail to add a comment, so continue any way
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest-junit.xml
github-token: ${{ steps.app_token.outputs.token }}
compile-all:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
flags: ["-O0", "-O1", "-O2"]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
- name: Compile all
run: poe compile_all ${{ matrix.flags }}
- name: Check for any changes
# this checks for empty output of porcelain status, if there's no output there's no diff
run: test -z "$(git status --porcelain examples/ test_cases/)"
- name: Show changed files summary
if: failure()
run: git status --porcelain examples/ test_cases/
- name: Show diff
if: failure()
run: git diff examples/ test_cases/
compile-all-windows:
runs-on: "windows-latest"
strategy:
fail-fast: false
matrix:
flags: ["-O0", "-O1", "-O2"]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
- name: Compile all
run: poe compile_all ${{ matrix.flags }}
# simple diff check here as line endings mess with git status
- name: Check diff
run: git diff --exit-code examples/ test_cases/
# run a test in all Windows
run-puyapy-windows:
name: "Run PuyaPy on Windows via ${{ matrix.shell }}"
runs-on: "windows-latest"
strategy:
fail-fast: false # Continue with other matrix jobs even if one fails
matrix:
shell: [cmd, pwsh, bash]
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/setup-python-venv
with:
python_version: '3.12.11'
- name: Compile AMM via compile_all
run: poe compile_all examples/amm
- name: Compile AMM directly
run: puyapy --log-level=debug examples/amm
build-and-test-binaries:
name: Build and test binaries
uses: ./.github/workflows/build-binaries.yaml
secrets: {}
with:
package_prefix: puya-${{ format('pr{0}', github.event.number) }}
allow_signing: false
run_manylinux_tests: false