-
Notifications
You must be signed in to change notification settings - Fork 90
36 lines (29 loc) · 973 Bytes
/
testing.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
name: testing
on:
push:
branches: master
pull_request:
jobs:
tox:
name: tox
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup
run: |
docker run --name db_postgres -p 5432:5432 -e POSTGRES_PASSWORD=testing -d postgres:latest
sleep 10 # wait for server to initialize
PGPASSWORD="testing" psql -c 'create database attachments;' -U postgres -h localhost
docker run --name db_mariadb -e MARIADB_ROOT_PASSWORD=testing -e MARIADB_DATABASE=attachements -p 3306:3306 -d mariadb:latest
sleep 10 # wait for server to initialize
pip install tox coverage
- name: Execute tests
run: |
tox