Skip to content

Merge pull request #17 from BaderSZ/dependabot/pip/certifi-2024.7.4 #49

Merge pull request #17 from BaderSZ/dependabot/pip/certifi-2024.7.4

Merge pull request #17 from BaderSZ/dependabot/pip/certifi-2024.7.4 #49

name: Python package
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load venv
uses: actions/cache@v3
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with=dev
- name: Lint with bandit
run: |
poetry run bandit --configfile pyproject.toml --verbose --recursive pollenflug/
- name: Test with pytest
run: |
poetry run pytest tests/*.py