This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
forked from pgadmin-org/pgadmin4
-
-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (57 loc) · 1.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
services:
db_source:
image: postgres:13
env:
POSTGRES_DB: postgres
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5408:5432
options: --health-cmd pg_isready --health-interval 3s --health-timeout 3s --health-retries 15
db_target:
image: postgres:13
env:
POSTGRES_DB: postgres
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5409:5432
options: --health-cmd pg_isready --health-interval 3s --health-timeout 3s --health-retries 15
steps:
- name: set up python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: checkout
uses: actions/checkout@v2
- name: dependency cache
id: venv-cache
uses: actions/cache@v2
with:
path: venv
key: venv-${{ runner.os }}-${{ hashFiles('setup.py') }}
- name: install dependencies
if: steps.venv-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install libkrb5-dev
python -m venv venv
source venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install pytest
pip install -r requirements.txt -c constraints.txt
- name: run tests
run: |
sudo mkdir /var/lib/pgadmin
sudo chown -R $USER:$USER /var/lib/pgadmin
sudo mkdir /var/log/pgadmin
sudo chown -R $USER:$USER /var/log/pgadmin
source venv/bin/activate
pytest test_cli