Fix CI: add missing test files, fix artifact upload path #2
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.11"] | |
| env: | |
| ASTROLENS_ARTIFACTS_DIR: ${{ github.workspace }}/astrolens_artifacts | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run unit tests | |
| run: | | |
| python -m pytest tests/test_morphology.py -v --tb=short | |
| - name: Run UI component tests | |
| run: | | |
| python tests/test_ui_components.py | |
| - name: Run OOD detection tests | |
| run: | | |
| python tests/test_all_features.py --section ood | |
| - name: Run morphology tests | |
| run: | | |
| python tests/test_all_features.py --section morphology | |
| - name: Run reconstruction tests | |
| run: | | |
| python tests/test_all_features.py --section reconstruction | |
| - name: Run GPU detection test | |
| run: | | |
| python tests/test_all_features.py --section gpu | |
| - name: Run web interface tests | |
| run: | | |
| python tests/test_all_features.py --section web | |
| - name: Run build spec test | |
| run: | | |
| python tests/test_all_features.py --section build | |
| - name: Upload test logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-logs-${{ matrix.os }} | |
| path: astrolens_artifacts/test_logs/ | |
| if-no-files-found: ignore | |
| retention-days: 7 |