-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (47 loc) · 1.12 KB
/
tests.yaml
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
---
name: tests
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
test:
name: ${{ matrix.test.name }}
runs-on: ubuntu-latest
strategy:
matrix:
test:
- name: unit
path: tests/unit
- name: api
path: tests/api
env:
REDIS_OM_URL: redis://localhost:6379/0
GITHUB_BASE_URL: http://localhost:4010
steps:
- uses: actions/checkout@v4
- name: Boot compose services
run: docker compose --profile tests up --build --detach
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: 3.11
cache: poetry
- run: poetry install
- name: Run tests
run: poetry run pytest ${{ matrix.test.path }}
env:
GITHUB_TOKEN: test
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.test.name }}
name: ${{ matrix.test.name }}
- name: Dump logs
run: docker compose --profile tests logs
if: always()