-
Notifications
You must be signed in to change notification settings - Fork 3
90 lines (72 loc) · 2.28 KB
/
test-suite.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: test-suite
on: [pull_request]
env:
db_password: "postgres"
db_port: "5432"
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python_version: ["3.8.12", "3.9.10", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Create dev database
uses: ./.github/actions/create-dev-database
with:
db_password: ${{ env.db_password }}
db_port: ${{ env.db_port }}
- name: Install dependencies
run: sudo apt-get install -y libpq-dev libgraphviz-dev
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
- uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: poetry install --no-interaction
- uses: actions/setup-node@v4
with:
node-version: "12"
- name: Set up frontend assets
run: |
npm ci
npm start
- name: Set DATABASE_URL (using ansible)
run: >
cp webinterface/.env.template webinterface/.env &&
ansible localhost
-m lineinfile
-a "
path=webinterface/.env
regex=^DATABASE_URL
line='DATABASE_URL=psql://vast:vastpsw@localhost:${{ env.db_port }}/vastdb'
"
- name: Create database user and database name
run: >
poetry run python ./init-tools/init-db.py
localhost ${{ env.db_port }}
postgres ${{ env.db_password }}
vast vastpsw vastdb
- name: Make relevant directories
run: mkdir pipeline-runs
- name: Download regression test data
run: bash -e ./download.sh
working-directory: ./vast_pipeline/tests/regression-data
- name: Run tests
run: poetry run python manage.py test