-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (66 loc) · 1.98 KB
/
run-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Quicktill
on: [push, pull_request]
jobs:
test:
name: Test quicktill
strategy:
matrix:
# Unfortunately the ubuntu-20.04 image already has
# postgresql-14 installed, not the native postgresql-12.
runs-on:
- 'ubuntu-20.04'
- 'ubuntu-22.04'
runs-on: ${{ matrix.runs-on }}
steps:
- name: Check out project
uses: actions/checkout@v3
- name: Update OS package list
run: |
sudo apt-get update
- name: Install OS-level dependencies
run: |
sudo apt-get install \
python3-pip \
python3-pytest \
python3-setuptools \
python3-cryptography \
python3-cups \
python3-dateutil \
python3-httplib2 \
python3-imagesize \
python3-odf \
python3-psycopg2 \
python3-qrcode \
python3-reportlab \
python3-requests \
python3-requests-oauthlib \
python3-sqlalchemy \
python3-twython \
python3-yaml
- name: Install python dependencies
# We need the latest flake8, we can't use the one packaged in
# ubuntu-20.04
run: |
pip3 install flake8
- name: Lint with flake8
run: |
flake8 quicktill
- name: Start postgresql
run: |
sudo systemctl start postgresql
pg_lsclusters
- name: Configure postgresql
run: |
sudo -u postgres createuser --echo -d $(whoami)
- name: Test with pytest
run: |
pytest-3 quicktill
- name: Run from command line
run: |
createdb testdb
./runtill -d dbname=testdb syncdb
./runtill -d dbname=testdb dbsetup examples/dbsetup.toml
./runtill -d dbname=testdb adduser "Test User" Test builtin:alice
./runtill -d dbname=testdb listusers
./runtill -d dbname=testdb totals
./runtill -d dbname=testdb flushdb