Switch from Ubuntu CP2K to conda-forge #1641
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
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 12 * * 1' | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash -el {0} # Lets conda work | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
environment-file: envs/environment-cpu.yml | |
- name: Install test dependencies | |
run: | | |
pip install -e .[test] | |
- name: Add quantum chemistry tools (Linux) | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
# CP2K package has disappeared as of 21Jan25 | |
# sudo apt update | |
# sudo apt install -y cp2k lammps | |
# Link the cp2k.ssmp executable to the cp2k_shell needed for ASE | |
mkdir -p bin | |
echo -e "#!/bin/bash\ncp2k.ssmp --shell \$@" > bin/cp2k_shell | |
chmod u+x bin/cp2k_shell | |
export PATH=$PATH:`realpath ./bin` | |
export CP2K_DATA_DIR=$CONDA_PREFIX/share/cp2k/data/ | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
shell: bash | |
- name: Lint with flake8 | |
run: | | |
pip install flake8 | |
flake8 --exclude mofa/utils mofa tests run_*.py # Ignore utils for now | |
- name: Test with pytest | |
run: | | |
pytest --cov=mofa --timeout=300 tests | |
- name: Coveralls | |
run: | | |
pip install coveralls | |
coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |