-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (50 loc) · 1.47 KB
/
backend_sumo_prod.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
name: integration
on:
push:
pull_request:
branches:
- main
release:
types:
- published
# workflow_dispatch:
# schedule:
# - cron: "48 4 * * *"
jobs:
sumo_prod:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: 🤖 Get shared key from Sumo
working-directory: ./backend_py/primary
env:
SHARED_KEY_SUMO_PROD: ${{ secrets.SHARED_KEY_DROGON_READ_PROD }}
run: |
if [ ${#SHARED_KEY_SUMO_PROD} -eq 0 ]; then
echo "Error: SHARED_KEY_SUMO_PROD is empty. Stopping the action."
exit 1
fi
mkdir ~/.sumo
echo $SHARED_KEY_SUMO_PROD > ~/.sumo/9e5443dd-3431-4690-9617-31eed61cb55a.sharedkey
- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- name: 📦 Install poetry and dependencies
working-directory: ./backend_py/primary
run: |
pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry lock --check --no-update # Check lock file is consistent with pyproject.toml
poetry install --with dev
- name: 🤖 Run tests
working-directory: ./backend_py/primary
env:
WEBVIZ_SUMU_ENV: prod
run: |
pytest -s --timeout=300 ./tests/integration