Migrate to new MP API, fix failing examples #48
Workflow file for this run
This file contains 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
# Runs the complete test suite incl. many external dependencies (like Openbabel) | |
name: Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
defaults: | |
run: | |
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.11"] | |
runs-on: ${{ matrix.os }} | |
env: | |
MP_API_KEY: ${{ secrets.PMG_MAPI_KEY }} | |
PMG_VASP_PSP_DIR: "${{ github.workspace }}/psp" | |
MPLBACKEND: Agg # non-interactive backend for matplotlib | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@main | |
with: | |
environment-name: matgenb | |
condarc: | | |
channels: | |
- conda-forge | |
create-args: >- | |
python=${{ matrix.python-version }} | |
enumlib | |
packmol | |
bader | |
openbabel | |
openff-toolkit | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Install dependencies | |
run: | | |
micromamba run -n matgenb uv pip install --upgrade -r requirements-ci.txt | |
- name: Run pytest | |
run: | | |
micromamba run -n matgenb pytest --ignore-glob=*notest.ipynb --nbmake notebooks/ |