Skip to content

Scaffold

Scaffold #2

Workflow file for this run

name: Python package
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci-job:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: ai_plat
POSTGRES_PASSWORD: password
POSTGRES_DB: ai_plat
ports:
- 5432:5432
options: --health-cmd "pg_isready -U ai_plat" --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
python-version: ["3.10"]
redis-version: [6]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run pre-commit
run: pre-commit run --all-files
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Test with pytest
run: |
pytest tests