Skip to content

Add support for pymongo 4 (#340) #1000

Add support for pymongo 4 (#340)

Add support for pymongo 4 (#340) #1000

Workflow file for this run

name: Run tests
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
cp tests/data/matador_pipelines_conf.yml $HOME/.matadorrc
python -m pip install --upgrade setuptools
pip install -r requirements/dev_requirements.txt
- name: Check for syntax errors and lint with flake8
run: |
pip install flake8
flake8 . \
--count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . \
--count \
--statistics
- name: Run pre-commit
run: |
pre-commit run --all-files || ( git status --short; git diff; exit 1 )
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.9, "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cp tests/data/matador_pipelines_conf.yml $HOME/.matadorrc
python -m pip install --upgrade setuptools pip wheel
pip install -e .[test,optional]
- name: Test with pytest
run: |
py.test -rs --cov-config .coveragerc --cov=./matador/ --cov-report=xml
# - name: Test notebook examples
# if: matrix.python-version == 3.8 && github.repository == 'ml-evs/matador'
# run: |
# py.test -rs -vvv --nbval --current-env --cov-config .coveragerc --cov=./matador/ --cov-append --cov-report=xml examples/interactive/magres_plotting/
# py.test -rs -vvv --nbval --current-env --cov-config .coveragerc --cov=./matador/ --cov-append --cov-report=xml examples/interactive/voltage/
# py.test -rs -vvv --nbval-lax --current-env --cov-config .coveragerc --cov=./matador/ --cov-append --cov-report=xml examples/interactive/pymatgen_and_ase_interfaces/
# py.test -rs -vvv --nbval-lax --current-env --cov-config .coveragerc --cov=./matador/ --cov-append --cov-report=xml examples/interactive/plot_styles/
- name: Upload coverage to Codecov
if: matrix.python-version == 3.8 && github.repository == 'ml-evs/matador'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests