-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.31 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Tests
on:
push:
branches:
- main
- 'releases/**'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up cache
uses: actions/cache@v4
id: cache-venv
with:
path: .venv
key: venv-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
run: pip install poetry
- name: Configure Poetry
run: poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --with dev
- name: Run linter
run: poetry run ruff check memoriam
- name: Pull or build Docker images
run: docker compose -f tests/docker-compose.yml build --pull
- name: Start docker-compose stack
run: docker compose -f tests/docker-compose.yml up --force-recreate --remove-orphans --detach
- name: Run integration and unit tests
run: poetry run pytest -c pytest.ini -svv --color=yes --cov=memoriam/ --junitxml=report.xml
- name: Stop docker-compose stack
if: always()
run: docker compose -f tests/docker-compose.yml down