Skip to content

fix: bump black from 23.3.0 to 23.12.1 #1050

fix: bump black from 23.3.0 to 23.12.1

fix: bump black from 23.3.0 to 23.12.1 #1050

Workflow file for this run

name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [released]
workflow_dispatch:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AZURE_OPENAI_API: ${{ secrets.AZURE_OPENAI_API }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
jobs:
validation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tools: ['black', 'bandit', 'pylint', 'flake8']
python: ['3.10'] # '3.11.3'
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ${{ matrix.tools }}
uses: microsoft/[email protected]
with:
${{ matrix.tools }}: true
workdir: '.'
testdir: 'tests'
python_version: ${{ matrix.python }}
tests:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADO_TOKEN: ${{ secrets.ADO_TOKEN }}
strategy:
fail-fast: true
matrix:
python: ['3.8', '3.9', '3.10', '3.11']
args: ['-m unit']
flags: ['unittests']
include:
- python: '3.10'
args: -m integration
flags: integration
- python: '3.11'
args: -m integration
flags: integration
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: Azure/[email protected]
if: ${{ matrix.flags == 'integration' }}
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: ${{ matrix.tools }}
uses: microsoft/[email protected]
with:
pytest: true
args: ${{ matrix.args }}
workdir: '.'
testdir: 'tests'
python_version: ${{ matrix.python }}
flags: ${{ matrix.flags }}-${{ matrix.python }}
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
if: ${{ github.event_name == 'release' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.PAT }}
- uses: actions/checkout@v2
if: ${{ github.event_name != 'release' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-python@v4
with:
python-version: '3.11.3'
cache: 'pip' # caching pip dependencies
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
tag_prefix: 'v'
default_bump: false
- name: Set Configurations
if: steps.tag_version.outputs.release_type && github.event_name != 'release'
shell: bash
env:
VERSION: ${{ steps.tag_version.outputs.new_version }}
run: sed -ri 's/(__version__ = ")([0-9]+\.[0-9]+\.[0-9]+?.*)(")/\1'"$VERSION"'\3/' "src/gpt_review/__init__.py" || exit 1
- name: Set Configurations
if: steps.tag_version.outputs.release_type && github.event_name == 'release'
shell: bash
env:
VERSION: ${{ steps.tag_version.outputs.previous_version }}
run: sed -ri 's/(__version__ = ")([0-9]+\.[0-9]+\.[0-9]+?.*)(")/\1'"$VERSION"'\3/' "src/gpt_review/__init__.py" || exit 1
- name: Publish Snapshot to TestPyPi
uses: microsoft/[email protected]
continue-on-error: true
if: ${{ github.event_name == 'pull_request_target' }}
with:
pypi_publish: true
pypi_password: ${{ secrets.TEST_PYPI_PASSWORD }}
pypi_repo: testpypi
version_suffix: -post${{ github.run_number }}-dev${{ github.run_attempt }}
workdir: '.'
python_version: '3.11.3'
- name: Publish RC to PyPi
uses: microsoft/[email protected]
if: ${{ github.event_name == 'push' }}
with:
pypi_publish: true
pypi_password: ${{ secrets.PYPI_PASSWORD }}
version_suffix: -rc${{ github.run_number }}-post${{ github.run_attempt }}
workdir: '.'
python_version: '3.11.3'
- name: Publish Release to PyPi
uses: microsoft/[email protected]
if: ${{ github.event_name == 'release' }}
with:
pypi_publish: true
pypi_password: ${{ secrets.PYPI_PASSWORD }}
workdir: '.'
python_version: '3.11.3'