Add AI assistant #152
Workflow file for this run
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 Pipeline | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint-and-test: | |
| name: Lint, type-check, and tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| shell: bash -l {0} # login shell so conda is available | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Set up a fast conda with mamba and create env from environment.yml | |
| - name: Set up Miniforge (Conda + Mamba) | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| miniforge-version: latest | |
| activate-environment: baio | |
| environment-file: environment.yml | |
| use-mamba: true | |
| auto-activate-base: false | |
| # Optional: cache the conda package cache for faster solves | |
| - name: Cache conda pkgs | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.conda/pkgs | |
| key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conda- | |
| - name: Show tool versions | |
| run: | | |
| python --version | |
| which python | |
| pip --version || true | |
| conda info | |
| conda list | head -n 50 || true | |
| # Ensure CI tooling is present (in case it's not pinned in environment.yml) | |
| - name: Install CI tools (pre-commit, mypy, pytest, build) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pre-commit mypy pytest pytest-cov build | |
| - name: Pre-commit (formatting & lint) | |
| run: pre-commit run --all-files | |
| - name: Type check (mypy) | |
| run: | | |
| # Adjusted to actual Python packages present in the repo | |
| mypy metaseq data_processing prompting binary_classifiers | |
| - name: Run unit tests (pytest) | |
| env: | |
| PYTHONWARNINGS: default | |
| run: | | |
| pytest --cov=metaseq \ | |
| --cov=data_processing \ | |
| --cov=prompting \ | |
| --cov=binary_classifiers \ | |
| --cov-fail-under=80 \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml | |
| # If a pyproject.toml exists, verify that the project builds | |
| - name: Verify packaging (pyproject) | |
| if: hashFiles('pyproject.toml') != '' | |
| run: | | |
| python -m build | |
| ls -lah dist | |