Skip to content

build(deps): bump the dependencies group across 3 directories with 15 updates #3576

build(deps): bump the dependencies group across 3 directories with 15 updates

build(deps): bump the dependencies group across 3 directories with 15 updates #3576

Workflow file for this run

name: Python CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
request:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@d10938876b114aa2a001b43b43158f1bf7008f1a
id: filter
with:
config: |
paths:
- py/VERSION.txt
- '.github/workflows/py.yml'
- 'pants.toml'
- 'pants.ci.toml'
- '.coveragerc'
- '.flake8'
- '.flake8.lock'
- 'mypy.ini'
- 'pytest.ini'
- 'py/**'
test:
runs-on: ubuntu-24.04
needs: request
if: >-
github.repository_owner == 'envoyproxy'
&& fromJSON(needs.request.outputs.run)
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
with:
gha-cache-key: "v0-${{ runner.os }}"
named-caches-hash: "${{ hashFiles('pants*toml') }}"
- name: Run pants test
run: "pants --colors test ::"
- name: Archive code coverage results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: coverage
path: dist/coverage/python/htmlcov/
lint:
runs-on: ubuntu-24.04
needs: request
if: >-
fromJSON(needs.request.outputs.run)
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
with:
gha-cache-key: "v0-${{ runner.os }}"
named-caches-hash: "${{ hashFiles('pants*toml') }}"
- name: Run pants lint
run: "pants --colors lint ::"
typecheck:
runs-on: ubuntu-24.04
needs: request
if: >-
fromJSON(needs.request.outputs.run)
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
with:
gha-cache-key: "v0-${{ runner.os }}"
named-caches-hash: "${{ hashFiles('pants*toml') }}"
- name: Run pants (type) check
run: "pants --colors check ::"
docs:
runs-on: ubuntu-24.04
# TODO: reenable once plugin is fixed
if: false
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
with:
gha-cache-key: "v0-${{ runner.os }}"
named-caches-hash: "${{ hashFiles('pants*toml') }}"
- name: Run pants README
run: "pants --colors readme --check=README.md ::"
package:
runs-on: ubuntu-24.04
needs:
- request
- test
- lint
- typecheck
# - docs
if: >-
fromJSON(needs.request.outputs.run)
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
with:
gha-cache-key: "v0-${{ runner.os }}"
named-caches-hash: "${{ hashFiles('pants*toml') }}"
- name: Run pants package
run: "pants --colors package ::"
- name: Archive created packages
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: python-artifacts
path: dist/*whl
status:
runs-on: ubuntu-24.04
if: >-
always()
&& github.event_name == 'pull_request'
name: Python
needs:
- request
- test
- lint
- typecheck
- package
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more jobs failed or were cancelled"
exit 1
fi
echo "All required jobs passed or were skipped"