Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only patch the action #120

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions .github/workflows/live_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
name: Tests against a Live Instance

on:
# allow manual runs
# Allow manual runs
workflow_dispatch:

# run every day
# Run every day
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * *"

jobs:
test-against-live-instance:
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 }}
sg-s marked this conversation as resolved.
Show resolved Hide resolved
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 }}
DEEP_ORIGIN_ACCESS_TOKEN: ${{ secrets.DEEP_ORIGIN_ACCESS_TOKEN }}
sg-s marked this conversation as resolved.
Show resolved Hide resolved


steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-python@v5
id: cached_python_setup
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: pyproject.toml

- name: "Running tests against a live instance..."
- name: Create API Tokens File
run: |
mkdir -p ~/.deeporigin
echo '{
"refresh": "'$REFRESH_TOKEN'",
"access": "'$ACCESS_TOKEN'"
}' > ~/.deeporigin/api_tokens

sg-s marked this conversation as resolved.
Show resolved Hide resolved
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip install -e .[test]
make test-github-live

- name: Refresh API tokens using deeporigin.auth
run: |
python -c "from deeporigin import auth; auth.get_tokens(refresh=True)"
sg-s marked this conversation as resolved.
Show resolved Hide resolved

- name: Run tests against a live instance
run: make test-github-live