-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.47 KB
/
live_tests.yaml
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: 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