Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Python CI
on:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/python-ci.yml

concurrency:
group: ghas-github-pulumi-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
python-ci:
uses: srendipity-lab/github-pulumi/.github/workflows/reusable-python-ci.yml@main
51 changes: 51 additions & 0 deletions .github/workflows/reusable-python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
workflow_call:
inputs:
disable-sudo:
type: boolean
default: true
runs-on:
type: string
default: "ubuntu-latest"

jobs:
install-and-checks:
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
# v5.5.0
with:
python-version: "3.13"
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
# v4.2.3
with:
path: ~/.local
key: poetry-latest
- uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a
# v1.4.1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- id: cache-deps
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
# v4.2.3
with:
path: |
./.venv
./.mypy_cache
key: python-3.13-poetry-${{ hashFiles('**/poetry.lock') }}
- run: make install
if: steps.cache-deps.outputs.cache-hit != 'true'
- name: Linting
run: |
make format-check
make lint
- name: Type checking
run: |
make type-check