This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (45 loc) · 1.54 KB
/
scripts.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
name: scripts
on:
push:
branches: main
pull_request:
branches: main
jobs:
test-e2e:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.6.1"
- name: Resolve dependencies
run: poetry export -f requirements.txt --without-hashes --output requirements.txt
- name: Build & run docker
env:
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_LOGIN: ${{ secrets.POSTGRES_LOGIN }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
SUPERUSER_LOGIN: ${{ secrets.SUPERUSER_LOGIN }}
SUPERUSER_ID: ${{ secrets.SUPERUSER_ID }}
SUPERUSER_PWD: ${{ secrets.SUPERUSER_PWD }}
GH_OAUTH_ID: ${{ secrets.GH_OAUTH_ID }}
GH_OAUTH_SECRET: ${{ secrets.GH_OAUTH_SECRET }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: docker compose -f docker-compose.test.yml up -d --build
- name: Docker sanity check
run: sleep 20 && nc -vz localhost 8050
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "requests>=2.31.0,<3.0.0" python-dotenv
- name: Run integration test
env:
SUPERUSER_LOGIN: ${{ secrets.SUPERUSER_LOGIN }}
SUPERUSER_PWD: ${{ secrets.SUPERUSER_PWD }}
run: python scripts/test_e2e.py