Skip to content

[pre-commit.ci] pre-commit autoupdate #2091

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #2091

Workflow file for this run

name: aiida-fleur
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: docs
sphinx-options: ''
allow-failure: false
- name: docs-nitpicky
sphinx-options: '-nW'
allow-failure: true
name: ${{ matrix.name }}
continue-on-error: ${{ matrix.allow-failure }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-docs-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-docs-
- name: Install python dependencies
run: |
pip install -e .[docs]
reentry scan || true
- name: Build documentation
env:
READTHEDOCS: 'True'
SPHINXOPTS: ${{ matrix.sphinx-options }}
run: |
make -C docs html
pre-commit:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-pre-commit-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-pre-commit-
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install python dependencies
run: |
pip install .[pre-commit,testing]
pip freeze
- name: Run pre-commit
run: |
pre-commit run --all-files || (git status --short; git diff ; exit 1)
tests:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
aiida: [{version: 'aiida-core==2.0.1', name: '2.0.1'},{version: 'aiida-core==2.3.0', name: '2.3.0'}]
masci-tools: [{version: 'masci-tools', name: 'stable'}]
bokeh-version: ['bokeh==3.0.3']
mpl-version: ['matplotlib==3.6.3']
add-name: ['']
allowed-to-fail: [false]
include:
- python-version: "3.11"
aiida: {version: 'aiida-core==2.3.0', name: '2.3.0'}
masci-tools: {version: 'masci-tools', name: 'stable'}
bokeh-version: 'bokeh==3.0.3'
mpl-version: 'matplotlib==3.6.3'
add-name: ''
allowed-to-fail: false
- python-version: 3.9
aiida: {version: 'git+https://github.com/aiidateam/aiida-core.git@main', name: 'latest'}
masci-tools: {version: 'masci-tools', name: 'stable'}
bokeh-version: 'bokeh==3.0.3'
mpl-version: 'matplotlib==3.6.3'
add-name: ''
allowed-to-fail: true
- python-version: 3.9
aiida: {version: 'aiida-core==2.0.1', name: '2.0.1'}
masci-tools: {version: 'git+https://github.com/JuDFTteam/masci-tools.git@develop', name: 'develop'}
bokeh-version: 'bokeh==3.0.3'
mpl-version: 'matplotlib==3.6.3'
add-name: ''
allowed-to-fail: true
- python-version: 3.9
aiida: {version: 'aiida-core==2.0.1', name: '2.0.1'}
masci-tools: {version: 'masci-tools', name: 'stable'}
bokeh-version: 'bokeh'
mpl-version: 'matplotlib'
add-name: '-latest-bokeh/mpl'
allowed-to-fail: true
fail-fast: false
name: ${{ matrix.python-version }}-aiida-${{ matrix.aiida.name }}-masci-${{ matrix.masci-tools.name }}${{ matrix.add-name }}
continue-on-error: ${{ matrix.allowed-to-fail }}
services:
postgres:
image: postgres:10
env:
POSTGRES_DB: test_${{ matrix.backend }}
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
steps:
- uses: actions/checkout@v2
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ matrix.aiida.name }}-tests-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ matrix.aiida.name }}-tests
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt update
sudo apt install postgresql
- name: Install python dependencies
run: |
pip install --upgrade wheel setuptools
pip install git+https://github.com/aiidateam/aiida-testing.git@main
pip install --no-deps git+https://github.com/aiidateam/aiida-common-workflows.git@master
pip install .[testing,graphs]
pip install ${{ matrix.aiida.version }} ${{ matrix.masci-tools.version }}
pip install ${{ matrix.bokeh-version }} ${{ matrix.mpl-version }}
reentry scan || true
- name: Run pytest
run: |
cd ./tests/
# create fake codes for tests to work on ci
touch local_exe/inpgen && chmod +x local_exe/inpgen
touch local_exe/fleur && chmod +x local_exe/fleur
./run_all_cov.sh --local-exe-hdf5
- name: Upload report to Codecov
uses: codecov/codecov-action@v1
with:
file: ./tests/coverage.xml
fail_ci_if_error: False
- uses: actions/upload-artifact@v3
if: failure()
with:
name: matplotlib-comparison-${{ matrix.python-version }}
path: tests/mpl-results