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

Conditionally approve resonance test on external PRs #137

Merged
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
39 changes: 33 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Continuous Integration

on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"

jobs:
test:
runs-on: ${{ matrix.platform }}

strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9', '3.10', '3.11' ]

steps:
- uses: actions/checkout@v4
- name: Setup Python
Expand All @@ -27,10 +28,7 @@ jobs:
python -m pip install tox-gh-actions==2.12.0
- name: Run tests
run: tox
- name: Run Resonance example integration test
run: tox -e test_resonance_example
env:
RESONANCE_API_KEY: ${{ secrets.RESONANCE_API_KEY }}

test_docs:
runs-on: ubuntu-latest
steps:
Expand All @@ -46,3 +44,32 @@ jobs:
sudo apt-get install graphviz
- name: Test if docs can be built
run: tox -e docs

run_resonance_integration_test:
needs: [test]
if: |
success() && (
github.event_name == 'schedule' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
)
runs-on: ${{ matrix.platform }}
environment: resonance-test # Keep the environment for secure secret management
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
python -m pip install tox-gh-actions==2.12.0
- name: Run Resonance example integration test
run: tox -e test_resonance_example
env:
RESONANCE_API_KEY: ${{ secrets.RESONANCE_API_KEY }}
Loading