forked from aiidateam/aiida-wannier90
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f6c32c
commit e26be99
Showing
8 changed files
with
107 additions
and
280 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,111 @@ | ||
name: Continuous Integration | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
install-type: [docs] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python-version }}-${{ matrix.install-type }}-${{ hashFiles('**/setup.json') | ||
}} | ||
restore-keys: pip-${{ matrix.python-version }}-${{ matrix.install-type }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install the python project | ||
env: | ||
INSTALL_TYPE: ${{ matrix.install-type }} | ||
run: .ci/install_script.sh | ||
- name: Build documentation | ||
env: | ||
READTHEDOCS: 'True' | ||
run: SPHINXOPTS='-nW' make -C docs html | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: doc-build | ||
path: docs/build/html | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
install-type: [dev_precommit] | ||
python-version: [3.11] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python-version }}-${{ matrix.install-type }}-${{ hashFiles('**/setup.json') | ||
}} | ||
restore-keys: pip-${{ matrix.python-version }}-${{ matrix.install-type }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install the python project | ||
env: | ||
INSTALL_TYPE: ${{ matrix.install-type }} | ||
run: .ci/install_script.sh | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 | ||
) | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Python dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-pre-commit-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | ||
restore-keys: pip-pre-commit-${{ matrix.python-version }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install the python project | ||
run: pip install -e .[pre-commit] | ||
|
||
- name: Run pre-commit | ||
run: pre-commit run --all-files || ( git status --short; git diff; exit 1 ) | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9] | ||
install-type: [testing] | ||
include: | ||
- python-version: 3.8 | ||
install-type: testing_sdist | ||
python-version: [3.8, 3.9, 3.10, 3.11] | ||
|
||
services: | ||
postgres: | ||
image: postgres:10 | ||
image: postgres:12 | ||
ports: | ||
- 5432:5432 | ||
- 5432:5432 | ||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
- 5672:5672 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Python dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-tests-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | ||
restore-keys: pip-tests-${{ matrix.python-version }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install the python project | ||
run: pip install -e .[tests] | ||
|
||
- name: Run pytest | ||
run: pytest --cov=aiida_wannier90 --cov-report=xml --cov-config=.coveragerc | ||
working-directory: tests | ||
|
||
- name: Upload coverage data | ||
run: codecov --file tests/coverage.xml | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.11] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python-version }}-${{ matrix.install-type }}-${{ hashFiles('**/setup.json') | ||
}} | ||
restore-keys: pip-${{ matrix.python-version }}-${{ matrix.install-type }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install the python project | ||
env: | ||
INSTALL_TYPE: ${{ matrix.install-type }} | ||
run: .ci/install_script.sh | ||
- name: Run pytest | ||
run: pytest --cov=aiida_wannier90 --cov-report=xml --cov-config=.coveragerc | ||
working-directory: tests | ||
- name: Upload coverage data | ||
if: ${{ matrix.install-type == 'testing' }} | ||
run: codecov --file tests/coverage.xml | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Python dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-docs-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | ||
restore-keys: pip-docs-${{ matrix.python-version }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install the python project | ||
run: pip intall -e .[docs] | ||
|
||
- name: Build documentation | ||
env: | ||
READTHEDOCS: "True" | ||
run: SPHINXOPTS='-nW' make -C docs html | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: doc-build | ||
path: docs/build/html |
This file was deleted.
Oops, something went wrong.
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 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 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
Oops, something went wrong.