Skip to content

ci(semantic-release): include all commit types in changelog and relea… #7

ci(semantic-release): include all commit types in changelog and relea…

ci(semantic-release): include all commit types in changelog and relea… #7

Workflow file for this run

name: test
on:
push:
branches:
- develop
pull_request:
types:
- opened
- synchronize
jobs:
run-tests:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
#----------------------------------------------
# Check-out repo
#----------------------------------------------
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
#----------------------------------------------
# Install Python and Poetry
# It uses .python-version file
#----------------------------------------------
- name: Set up Python
uses: actions/setup-python@v5
id: setup-python
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/venvs
installer-parallel: true
#----------------------------------------------
# Cache venv
#----------------------------------------------
- name: Cache venv
uses: actions/cache@v4
id: cached-poetry-dependencies
with:
path: ~/venvs
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# Install dependencies if cache miss
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# Run linting checks
#----------------------------------------------
- name: Run linting checks
run: poetry run ruff check
#----------------------------------------------
# Run tests
#----------------------------------------------
- name: Run tests
run: poetry run pytest