Skip to content

ci: use reusable workflow #298

ci: use reusable workflow

ci: use reusable workflow #298

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # every week (for --pre release tests)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-manifest:
name: Check Manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run check-manifest
test:
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@main
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
pip-install-flags: ${{ github.event_name == 'schedule' && '--pre' || '' }}
report-failures: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.10", "3.11", "3.12"]
include:
- python-version: "3.9"
platform: ubuntu-latest
test_app_model:
uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@main
with:
package_to_test: pyapp-kit/app-model
package-extras: "qt,test,test-qt"
qt: "PyQt5"
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: install
run: python -m pip install -e .[test]
- name: Run benchmarks
uses: CodSpeedHQ/action@v1
with:
run: pytest --codspeed -v --color=yes
deploy:
name: Deploy
needs: test
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Build
run: |
python -m pip install build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: dist/*