precipitation anomaly diagnostics ci / pull_request / 95/merge #30
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: precipitation-anomaly-diagnostics-ci | |
| run-name: precipitation anomaly diagnostics ci / ${{ github.event_name }} / ${{ github.ref_name }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - ".github/workflows/precipitation-anomaly-diagnostics-ci.yml" | |
| - "projects/precipitation-anomaly-diagnostics/**" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/precipitation-anomaly-diagnostics-ci.yml" | |
| - "projects/precipitation-anomaly-diagnostics/**" | |
| permissions: {} | |
| env: | |
| PRECIPITATION_DIAGNOSTICS_PYTHON_VERSION: "3.11" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: projects/precipitation-anomaly-diagnostics | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PRECIPITATION_DIAGNOSTICS_PYTHON_VERSION }} | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install project | |
| run: python -m pip install -e .[dev] | |
| - name: Run tests | |
| run: python -m pytest | |
| - name: Compile modules and scripts | |
| run: python -m compileall src scripts | |
| - name: CLI help smoke tests | |
| run: | | |
| python scripts/run_preprocessing.py --help | |
| python scripts/run_eof_analysis.py --help | |
| python scripts/run_composite_analysis.py --help |