Skip to content

Match most recent subscription only #348

Match most recent subscription only

Match most recent subscription only #348

Workflow file for this run

name: Linting and Testing
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
bandit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Security check - Bandit
uses: joshvote/[email protected]
with:
project_path: .
ignore_failure: false
config_file: pyproject.toml
- name: Security check report artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: Security report
path: output/security_report.txt
overwrite: true
flake8_py312:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Setup flake8 annotations
uses: rbialon/flake8-annotations@v1
- name: Lint with flake8
if: always()
run: |
pip install flake8
flake8 . --count --statistics
black_formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
mypy_py312:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install Dependencies
run: |
pip install .[dev]
- name: Add mypy annotator
uses: pr-annotators/[email protected]
- name: Run mypy
run: |
mypy .
pytest_py312:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install Dependencies
run: |
pip install .[test]
- name: Run Pytest
run: |
export DATABASE_URL="postgresql+asyncpg://fake:fake@localhost:5432/fake"
pytest --junit-xml=.test_report.xml
- name: Upload Results
uses: test-summary/action@v1
with:
paths: .test_report.xml
if: always()