Skip to content

Changed default retention_timeout to zero for `AsyncBackgroundBatch… #93

Changed default retention_timeout to zero for `AsyncBackgroundBatch…

Changed default retention_timeout to zero for `AsyncBackgroundBatch… #93

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- '*'
tags:
- 'v*'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Set Up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install flake8 pytest mypy
- name: Flake8
run: python -m flake8
- name: MyPy
run: python -m mypy aiuti --strict
test:
name: Test
needs: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
python:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- 'pypy-3.8'
- 'pypy-3.9-v7.3.12'
- 'pypy-3.10-v7.3.12'
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest']
exclude:
- python: 'pypy-3.8'
os: 'windows-latest'
- python: 'pypy-3.9-v7.3.12'
os: 'windows-latest'
- python: 'pypy-3.10-v7.3.12'
os: 'windows-latest'
steps:
- uses: actions/checkout@v4.1.1
- name: Set Up Python
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U -r requirements.txt pytest-coverage codecov
- name: Run Tests
run: python -m pytest -v --cov=aiuti --cov-report=xml
- name: Upload Coverage
run: python -m codecov --token=${{ secrets.CODECOV_TOKEN }}
publish:
if: startsWith(github.ref, 'refs/tags/')
name: Create Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Set Up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools wheel
- name: Build
run: python setup.py sdist bdist_wheel
- name: Change Log
id: change_log
run: >-
TEXT=$(
git --no-pager log --pretty=format:'- %s (%h)'
`git describe --abbrev=0 --tags HEAD^1`..HEAD
)
echo "text=$TEXT" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Change Log:
${{ steps.change_log.output.text }}
draft: true # Give me a moment to edit in the description
prerelease: false
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}