-
Notifications
You must be signed in to change notification settings - Fork 158
51 lines (41 loc) · 1.23 KB
/
test.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
name: "CI"
on:
pull_request:
branches:
- "master"
push:
branches:
- "master"
jobs:
test:
name: "Testing with database: ${{ matrix.database }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
database:
- "default"
- "sqlite"
- "mariadb"
- "postgresql"
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Build image"
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml build
- name: "Install dependencies"
run: pip install pytest pytest-docker requests
- name: "Run tests"
run: py.test --database=${{ matrix.database }} tests/
- name: "Get docker logs"
if: ${{ always() }}
run: docker-compose -p "wallabag_${{ matrix.database }}" -f tests/docker-compose.${{ matrix.database }}.yml logs wallabag
- name: "Cleanup environment"
if: ${{ always() }}
run: docker-compose -p "wallabag_${{ matrix.database }}" -f tests/docker-compose.${{ matrix.database }}.yml down -v