-
-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (49 loc) · 1.51 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
48
49
50
51
52
name: scripts
on:
push:
branches: main
pull_request:
branches: main
jobs:
end-to-end:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: [3.8]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: x64
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.0"
- name: Resolve dependencies
run: poetry export -f requirements.txt --without-hashes --output src/app/requirements.txt
- name: Build & run docker
env:
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
BUCKET_MEDIA_FOLDER: ${{ secrets.BUCKET_MEDIA_FOLDER }}
S3_ENDPOINT_URL: ${{ secrets.S3_ENDPOINT_URL }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_REGION: ${{ secrets.S3_REGION }}
run: |
docker-compose up -d --build
docker ps
- name: Cache python modules
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-scripts-deps-${{ matrix.python }}-${{ hashFiles('scripts/requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: End-to-End test
run: |
sleep 5
python scripts/api_e2e.py 8080