Added functionality to write data files for solid-liquid interface sy… #43
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
# This workflow runs only on Ubuntu and aims to be more complete than the Mac and Windows workflows. | |
# In particular, Openbabel and many of the external command line dependencies are included for testing.defaults: | |
# The ext package is also only tested in this workflow. Coverage is also computed based on this platform. | |
name: Testing | |
on: [ push, pull_request ] | |
jobs: | |
test: | |
strategy: | |
max-parallel: 20 | |
matrix: | |
# This distribution of tests is designed to ensure an approximately even time to finish for parallel jobs. | |
include: | |
- pkg: pymatgen/analysis/defects pymatgen/analysis/chemenv pymatgen/analysis/elasticity pymatgen/analysis/magnetism | |
pkg_id: 1 | |
- pkg: pymatgen/analysis --ignore=pymatgen/analysis/defects --ignore=pymatgen/analysis/chemenv --ignore=pymatgen/analysis/elasticity --ignore=pymatgen/analysis/magnetism | |
pkg_id: 2 | |
- pkg: pymatgen/electronic_structure pymatgen/symmetry pymatgen/ext pymatgen/command_line | |
pkg_id: 3 | |
- pkg: pymatgen --ignore=pymatgen/analysis --ignore=pymatgen/electronic_structure --ignore=pymatgen/symmetry --ignore=pymatgen/ext --ignore=pymatgen/command_line | |
pkg_id: 4 | |
runs-on: ubuntu-latest | |
env: | |
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }} | |
MPLBACKEND: "Agg" | |
PMG_TEST_FILES_DIR: ${{ github.workspace }}/test_files | |
GULP_LIB: ${{ github.workspace }}/cmd_line/gulp/Libraries | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.8 | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install OpenBabel and Libs | |
shell: bash -l {0} | |
run: | | |
# Required for gulp. | |
sudo apt-get install csh gfortran | |
conda install -c conda-forge openbabel | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
# Note that this is the way to update env variables in a way that persist for the entire job. | |
for pkg in `ls cmd_line`; do echo "`pwd`/cmd_line/$pkg/Linux_64bit" >> $GITHUB_PATH; done | |
pip install --upgrade pip wheel | |
pip install -r requirements.txt | |
pip install -r requirements-optional.txt -r requirements-dev.txt | |
pip install scikit-image==0.18.1 | |
pip install -e . | |
- name: pytest ${{ matrix.pkg }} | |
shell: bash -l {0} | |
run: | | |
pytest ${{ matrix.pkg }} --cov=pymatgen | |
- name: Upload coverage | |
uses: actions/upload-artifact@v1 | |
with: | |
name: coverage-${{ matrix.pkg_id }} | |
path: .coverage | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install deps | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Download coverage-1 | |
uses: actions/download-artifact@v1 | |
with: | |
name: coverage-1 | |
- name: Download coverage-2 | |
uses: actions/download-artifact@v1 | |
with: | |
name: coverage-2 | |
- name: Download coverage-3 | |
uses: actions/download-artifact@v1 | |
with: | |
name: coverage-3 | |
- name: Download coverage-4 | |
uses: actions/download-artifact@v1 | |
with: | |
name: coverage-4 | |
- name: Run coverage | |
continue-on-error: true | |
run: | | |
coverage combine coverage*/.coverage* | |
coverage report | |
coverage xml | |
- name: Coveralls Python | |
continue-on-error: true | |
uses: AndreMiras/coveralls-python-action@v20201129 |