Skip to content

Endpoint tests with Sumo data #48

Endpoint tests with Sumo data

Endpoint tests with Sumo data #48

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