Skip to content

Fix format-check task (#198) #32

Fix format-check task (#198)

Fix format-check task (#198) #32

Workflow file for this run

name: "inngest"
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "!examples/**"
- "!pkg/inngest_encryption/**"
- "!tests/inngest_encryption/**"
- "**/*.py"
- ".github/**"
- "Makefile"
- "constraints.txt"
- "pyproject.toml"
- "pytest.ini"
- "ruff.toml"
jobs:
itest:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.12"]
timeout-minutes: 5
steps:
- uses: "actions/checkout@v2"
- name: "Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install"
run: "make install"
- name: "Integration test"
run: "make itest"
working-directory: "./pkg/inngest"
lint:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- uses: "actions/checkout@v2"
- name: "Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install"
run: "make install"
- name: "Lint"
run: "make lint"
working-directory: "./pkg/inngest"
publish-pypi:
runs-on: "ubuntu-latest"
needs:
- "itest"
- "lint"
- "type-check"
- "utest"
# Only publish tagged versions.
# TODO: Add a check to ensure that the git tag matches the version.
if: "startsWith(github.ref, 'refs/tags/inngest@')"
permissions:
id-token: write
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: "actions/checkout@v2"
- name: "Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install"
run: "make install"
- name: "Build"
run: "make build"
working-directory: "./pkg/inngest"
- name: "Upload package to PyPI"
uses: "pypa/gh-action-pypi-publish@release/v1"
with:
packages-dir: "./pkg/inngest/dist"
type-check:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- uses: "actions/checkout@v2"
- name: "Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install"
run: "make install"
- name: "Type check"
run: "make type-check"
working-directory: "./pkg/inngest"
utest:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- uses: "actions/checkout@v2"
- name: "Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install"
run: "make install"
- name: "Unit test"
run: "make utest"
working-directory: "./pkg/inngest"