mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-08 03:28:35 +03:00
* Update pyproject.toml * add pre-commit * Create .pre-commit-config.yaml * Comment out ruff * Update .pre-commit-config.yaml * General formatting * Create format-and-fail.yml * Update ci.yml * Add pre-commit to dev dependencies * Update pyproject.toml
41 lines
834 B
YAML
41 lines
834 B
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
|
|
jobs:
|
|
test:
|
|
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
|