mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-08 03:28:35 +03:00
45 lines
851 B
YAML
45 lines
851 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@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install pipenv
|
|
run: pip install pipenv
|
|
working-directory: src
|
|
|
|
- name: Install dependencies
|
|
run: pipenv install --dev
|
|
working-directory: src
|
|
|
|
- name: Run tests with coverage
|
|
run: PYTHONPATH=. pipenv run coverage run -m pytest -v --color=yes tests/
|
|
working-directory: src
|
|
|
|
- name: Report coverage
|
|
run: pipenv run coverage report
|
|
working-directory: src |