-
Notifications
You must be signed in to change notification settings - Fork 15
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
f9383f6
commit f119b60
Showing
3 changed files
with
146 additions
and
7 deletions.
There are no files selected for viewing
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,11 +1,9 @@ | ||
name: CI | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: [master, develop] | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
jobs: | ||
|
||
|
@@ -18,7 +16,29 @@ jobs: | |
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- uses: pre-commit/[email protected] | ||
id: cache-pip | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python-version }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-${{ matrix.python-version }}-tests | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip | ||
pip --version | ||
- name: Install wheel | ||
run: pip install wheel | ||
- name: Install AiiDA-LAMMPS | ||
run: | | ||
pip install -e .[testing,pre-commit] | ||
pip freeze | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files || ( git diff; git status; exit 1; ) | ||
|
||
tests: | ||
|
||
|
@@ -82,7 +102,7 @@ jobs: | |
- name: Installation | ||
run: | | ||
pip install -e .[testing] | ||
pip install -e .[testing,pre-commit] | ||
reentry scan | ||
- name: Run pytest | ||
|
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 |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master, develop] | ||
pull_request: | ||
|
||
jobs: | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
id: cache-pip | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python-version }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-${{ matrix.python-version }}-tests | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip | ||
pip --version | ||
- name: Install wheel | ||
run: pip install wheel | ||
- name: Install AiiDA-LAMMPS | ||
run: | | ||
pip install -e .[testing,pre-commit] | ||
pip freeze | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files || ( git diff; git status; exit 1; ) | ||
|
||
tests: | ||
|
||
timeout-minutes: 30 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: 3.7 | ||
lammps-version: "2019.06.05" | ||
backend: django | ||
- python-version: 3.7 | ||
lammps-version: "2019.06.05" | ||
backend: sqlalchemy | ||
- python-version: 3.8 | ||
lammps-version: "2020.12.24" | ||
backend: django | ||
- python-version: 3.9 | ||
lammps-version: "2020.12.24" | ||
backend: django | ||
|
||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:10 | ||
env: | ||
POSTGRES_DB: test_${{ matrix.backend }} | ||
POSTGRES_PASSWORD: '' | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup conda | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
# update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
conda-channels: conda-forge | ||
|
||
- name: install lammps | ||
run: conda install -y lammps==${{ matrix.lammps-version }} | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip | ||
pip --version | ||
- name: Installation | ||
run: | | ||
pip install -e .[testing,pre-commit] | ||
reentry scan | ||
- name: Run pytest | ||
run: | | ||
pytest --lammps-exec lmp_serial --cov=aiida_lammps --cov-report=xml --cov-report=term-missing | ||
- name: Upload to Codecov | ||
if: matrix.python-version == 3.8 | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: pytests-lammps | ||
flags: pytests | ||
file: ./coverage.xml | ||
fail_ci_if_error: true |
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