Skip to content

chore: [pre-commit.ci] automatic update #136

chore: [pre-commit.ci] automatic update

chore: [pre-commit.ci] automatic update #136

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Semantic Release
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
Quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.3.2
- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true
- name: View poetry version
run: poetry --version
- name: Install dependencies
run: |
poetry install
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# poetry run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# poetry run flake8 . --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# poetry run python -m pytest -v tests
Release:
needs: Quality
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
PyPI_token: ${{ secrets.PYPI_TOKEN }}