Skip to content

Modernize CI (retired runners, deprecated actions); pytak >= 7.3.0 #1

Modernize CI (retired runners, deprecated actions); pytak >= 7.3.0

Modernize CI (retired runners, deprecated actions); pytak >= 7.3.0 #1

Workflow file for this run

name: CI
on:
push:
branches: ['**']
tags: ['*']
pull_request:
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package and test tools
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio
pip install .
- name: Test with pytest
run: pytest tests/
package-deb:
name: Build Debian Package
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-22.04
env:
DEB_BUILD_OPTIONS: nocheck
steps:
- uses: actions/checkout@v4
- name: Install Debian build dependencies
run: sudo bash debian/install_pkg_build_deps.sh
- name: Build Debian package
run: make clean install_test_requirements package
- uses: actions/upload-artifact@v4
with:
name: artifact-deb
path: deb_dist/*.deb
release:
name: Create GitHub Release
needs: [package-deb]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact-deb
path: dist/
- name: Create release and upload packages
uses: softprops/action-gh-release@v2
with:
files: dist/*