Skip to content

Commit

Permalink
Merge pull request #35 from aiida-phonopy/dev/update-ci
Browse files Browse the repository at this point in the history
Update ci workflow
  • Loading branch information
bastonero committed Oct 24, 2022
2 parents f9426b6 + e2376a7 commit 3717bd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 32 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous Integration
name: ci

on: [push, pull_request]

Expand All @@ -23,35 +23,23 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.8'

- name: Install python dependencies
run:
pip install -e .[pre-commit,tests]
run: pip install -e .[pre-commit,tests]

- name: Run pre-commit
run:
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
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]
aiida-version: [1.6.0, 2.0.0]
phonopy-version: [2.11.0, 2.12.0, 2.14.0]
python-version: ['3.8', '3.9']

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:
Expand All @@ -74,18 +62,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install aiida develop version
run: |
pip install aiida==matrix.aiida-version
- name: Install system dependencies
run: |
sudo apt update
sudo apt install postgresql-12
- name: Install phonopy version
run: |
pip install phonopy==matrix.phonopy-version
run: sudo apt update && sudo apt install postgresql

- name: Install python dependencies
run: |
Expand All @@ -94,5 +72,4 @@ jobs:
reentry scan
- name: Run pytest
run:
pytest -sv tests
run: pytest -sv tests
4 changes: 3 additions & 1 deletion src/aiida_phonopy/calculations/functions/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

from aiida import orm
from aiida.engine import calcfunction
from aiida.plugins import DataFactory

from aiida_phonopy.data import PhonopyData, PreProcessData
PreProcessData = DataFactory('phonopy.preprocess')
PhonopyData = DataFactory('phonopy.phonopy')

__all__ = (
'get_unitcell_from_distance', 'get_primitive_from_distance', 'get_supercell_from_distance',
Expand Down
1 change: 0 additions & 1 deletion src/aiida_phonopy/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
"""DataTypes for handling phonopy and frozen phonons calculations."""

from .force_constants import *
from .phonopy import *
from .preprocess import *
Expand Down

0 comments on commit 3717bd1

Please sign in to comment.