Skip to content

add pytest-xdist and tests in CI #19

add pytest-xdist and tests in CI

add pytest-xdist and tests in CI #19

Workflow file for this run

name: Lint and Tests
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "poetry"
- name: Install dependencies
run: |
poetry env use "3.11"
poetry export --only lint --output lint-requirements.txt
pip install -r lint-requirements.txt
- name: Run Ruff
run: ruff check --output-format=github .
test:

Check failure on line 23 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Lint and Tests

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 23, Col: 5): Unexpected value 'test'
name: Run Tests
needs: lint
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports: ["5432:5432"]
redis:
image: redis:7.0.12-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: 3.11
cache: "poetry"
- run: poetry install
- run: poetry run pytest -x -n auto --dist loadfile
env:
DB_HOST: "localhost"
REDIS_HOST: "localhost"
REDIS_PORT: "6379"