Skip to content

chore(ci): Align GitHub workflows across Python projects #1

chore(ci): Align GitHub workflows across Python projects

chore(ci): Align GitHub workflows across Python projects #1

Workflow file for this run

name: Run code checks
on:
# Trigger code checks on opening a new pull request.
# Secrets are only made available to the integration tests job, with a manual approval
# step required for PRs from forks. This prevents their potential exposure.
pull_request:
# Trigger for pushing to the master branch is handled by the pre-release workflow.
# It should also be possible to trigger checks manually
workflow_dispatch:
# Allow this workflow to be invoked as a reusable workflow from other workflows
workflow_call:
jobs:
actions_lint_check:
name: Actions lint check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run actionlint
uses: rhysd/[email protected]
lint_check:
name: Lint check
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
type_check:
name: Type check
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
# Create a custom unit tests job, because apify-shared-python does not unit codecov report.
unit_tests:
name: Unit tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv package manager
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: make install-dev
- name: Run unit tests
run: make unit-tests-cov