CI #19
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: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| # At 07:00 UTC on Monday and Thursday. | |
| - cron: "0 7 * * 1,4" | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.os }}-latest | |
| name: "tests" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ['ubuntu'] | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Install environment" | |
| uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: devtools/conda-envs/test.yml | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| # alchemiscale #502 is merged to main but not yet on a conda-forge | |
| # release, so overlay the package from git main to pick up | |
| # `_compute_jobs_to_create` and `max_submit_per_cycle`. Switch to the | |
| # conda-forge release once it includes #502. | |
| - name: "Install alchemiscale from git main" | |
| run: | | |
| python -m pip install --no-deps \ | |
| git+https://github.com/OpenFreeEnergy/alchemiscale.git@main | |
| # Not --no-deps: the package declares no runtime deps (those come from | |
| # the conda env), so this only pulls pytest from the `test` extra. | |
| - name: "Install" | |
| run: python -m pip install -e "./pkg[test]" | |
| - name: "Environment Information" | |
| run: | | |
| micromamba info | |
| micromamba list | |
| # test_compute_manager.py is an intentional, unimplemented stub | |
| # (raises NotImplementedError) and is tracked separately; ignore it | |
| # here so CI reflects the implemented suite. | |
| - name: "Run tests" | |
| timeout-minutes: 30 | |
| run: | | |
| pytest -v pkg/src/alchemiscale_k8s/tests \ | |
| --ignore=pkg/src/alchemiscale_k8s/tests/test_compute_manager.py |