Nightly Integration Tests #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Integration Tests | |
| on: | |
| schedule: | |
| # Run at 2 AM UTC daily | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| - name: Run integration tests | |
| env: | |
| # Add any API keys/credentials needed for live tests | |
| EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }} | |
| EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }} | |
| run: | | |
| # Run tests that hit real APIs (mark with @pytest.mark.integration) | |
| pytest tests/ -m integration || true | |
| - name: Check external service availability | |
| run: | | |
| # Test that external services are reachable | |
| python -c " | |
| import requests | |
| services = [ | |
| 'https://search.asf.alaska.edu', | |
| 'https://scihub.copernicus.eu', | |
| 'https://cmr.earthdata.nasa.gov', | |
| ] | |
| for url in services: | |
| try: | |
| r = requests.get(url, timeout=10) | |
| print(f'✓ {url}: {r.status_code}') | |
| except Exception as e: | |
| print(f'✗ {url}: {e}') | |
| " || true |