Skip to content

feat: added semantic releases #67

feat: added semantic releases

feat: added semantic releases #67

Workflow file for this run

name: "Code checks"
on: [ "push", "pull_request" ]
jobs:
setup:
name: Setup Python, Poetry & install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4 # Uses .python-version by default
- uses: benjavicente/setup-poetry@main
with:
poetry-version: 1.4.0
unittests:
name: Unittests (PyTest)
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4 # Uses .python-version by default
- uses: benjavicente/setup-poetry@main
with:
poetry-version: 1.4.0
- uses: ts-graphviz/setup-graphviz@v1
- name: Run PyTest with coverage
uses: pavelzw/pytest-action@v2
with:
custom-pytest: 'poetry run pytest'
custom-arguments: '--cov-report term --cov-report lcov:coverage.lcov --cov'
verbose: true
job-summary: true
report-title: 'Test Report'
click-to-expand: true
emoji: true
- name: Archive curl result from app test
if: always()
uses: actions/upload-artifact@v3
with:
name: Curl result from app test
path: tests/generated_streamlit_http_get_response.html
- name: Upload coverage (Coveralls)
uses: coverallsapp/github-action@v2
formatting:
name: Formatting (black)
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
linting:
name: Linting (ruff)
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4 # Uses .python-version by default
- uses: benjavicente/setup-poetry@main
with:
poetry-version: 1.4.0
- run: poetry run ruff .
release:
name: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
needs:
- setup
- unittests
- formatting
- linting
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}