Skip to content

Tests against a Live Instance #25

Tests against a Live Instance

Tests against a Live Instance #25

Workflow file for this run

name: Tests against a Live Instance
on:
# Allow manual runs
workflow_dispatch:
# Run every day
schedule:
- cron: "0 0 * * *"
jobs:
test-live-instance:
runs-on: ubuntu-latest
env:
# Secrets for API and organization
REFRESH_TOKEN: ${{ secrets.DEEP_ORIGIN_REFRESH_TOKEN }}
ACCESS_TOKEN: ${{ secrets.DEEP_ORIGIN_ACCESS_TOKEN }}
DEEP_ORIGIN_ORGANIZATION_ID: ${{ secrets.DEEP_ORIGIN_ORGANIZATION_ID }}
DEEP_ORIGIN_API_ENDPOINT: ${{ secrets.DEEP_ORIGIN_API_ENDPOINT }}
DEEP_ORIGIN_NUCLEUS_API_ROUTE: ${{ secrets.DEEP_ORIGIN_NUCLEUS_API_ROUTE }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Create API Tokens File
run: |
mkdir -p ~/.deeporigin
echo '{
"refresh": "'$REFRESH_TOKEN'",
"access": "'$ACCESS_TOKEN'"
}' > ~/.deeporigin/api_tokens
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip install -e .[test]
- name: Refresh API tokens using deeporigin.auth
run: |
python -c "from deeporigin import auth; auth.get_tokens(refresh=True)"
- name: Run tests against a live instance
run: make test-github-live