Fix nightly CI #3025
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" | |
| schedule: | |
| - cron: "0 0 * * *" | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, 💢=${{ matrix.pydantic-version }}, 👁️=${{ matrix.openeye }}, ∫=${{ matrix.integration }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest] | |
| python-version: ["3.11", "3.12"] | |
| pydantic-version: ["1"] | |
| openeye: [true, false] | |
| integration: [true] | |
| env: | |
| OE_LICENSE: ${{ github.workspace }}/oe_license.txt | |
| BEFLOW_OPTIMIZER_WORKER_MAX_MEM: 4 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install with OpenEye Toolkits | |
| if: ${{ matrix.openeye == true }} | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| micromamba-binary-path: ~/.local/bin/micromamba | |
| environment-file: devtools/conda-envs/test-env.yaml | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| pydantic=${{ matrix.pydantic-version }} | |
| - name: Install with AmberTools | |
| if: ${{ matrix.openeye == false }} | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| micromamba-binary-path: ~/.local/bin/micromamba | |
| environment-file: devtools/conda-envs/no_openeye.yaml | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| pydantic=${{ matrix.pydantic-version }} | |
| - name: License OpenEye | |
| if: ${{ matrix.openeye == true }} | |
| run: | | |
| echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE} | |
| python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()" | |
| env: | |
| SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }} | |
| - name: Install Package | |
| run: python -m pip install -e . | |
| - name: Conda Environment Information | |
| run: | | |
| micromamba info | |
| micromamba list | |
| pip list | |
| - name: Run Tests | |
| run: python -m pytest -v --cov=openff --cov-config=setup.cfg openff/bespokefit/_tests/ --cov-report=xml | |
| - name: Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| - name: Run Integration Tests and print logs | |
| if: ${{ matrix.integration == true }} | |
| run: | | |
| mkdir integration_test_directory | |
| openff-bespoke executor run --smiles 'CC' \ | |
| --workflow 'default' \ | |
| --default-qc-spec xtb gfn2xtb none \ | |
| --target-torsion '[C:1]-[C:2]' \ | |
| --directory integration_test_directory | |
| ls -lhrt integration_test_directory/ | |
| cat integration_test_directory/*.log |