Skip to content

Exit CP2K applications more reliably #994

Exit CP2K applications more reliably

Exit CP2K applications more reliably #994

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI
on: [push, pull_request]
permissions:
contents: read
defaults:
run:
shell: bash -el {0} # Lets conda work
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
max-parallel: 5
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ${{ matrix.os == 'ubuntu-latest' && 'envs/environment-cpu.yml' || 'envs/environment-macos.yml' }}
activate-environment: test
auto-activate-base: true
auto-update-conda: false
remove-profiles: true
architecture: x64
clean-patched-environment-file: true
run-post: true
use-mamba: true
miniforge-version: latest
- name: Display Environment
run: conda list
- name: Install test dependencies
run: |
pip install -e .[test]
- name: Lint with flake8
run: |
pip install flake8
flake8 examol tests
- name: Add quantum chemistry tools (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt install -y cp2k
- name: Run example
run: examol run examples/redoxmers/spec.py:spec
- name: Test with pytest
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pytest --cov=examol --timeout=300 tests
- name: Coveralls
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}