mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-07 19:18:34 +03:00
41 lines
848 B
YAML
41 lines
848 B
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
|
|
jobs:
|
|
test-with-coverage:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
redis:
|
|
image: redis:6-alpine
|
|
ports:
|
|
- 6379:6379
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install Poetry
|
|
run: pipx install poetry
|
|
|
|
- name: Install dependencies
|
|
run: poetry install --no-interaction --with dev
|
|
|
|
- name: Set dev environment variable
|
|
run: echo "ENVIRONMENT_FILE=.env.test" >> $GITHUB_ENV
|
|
|
|
- name: Run tests with coverage
|
|
run: poetry run coverage run -m pytest -v -ra --color=yes app/tests/
|
|
|
|
- name: Report coverage
|
|
run: poetry run coverage report
|