mirror of https://github.com/phonopy/phono3py.git
Update .travis.yml and github action scripts
This commit is contained in:
parent
f5b8ad25e3
commit
5f0071a46e
|
@ -0,0 +1,40 @@
|
|||
name: Python Package using Conda
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- rc
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Add conda to system path
|
||||
run: |
|
||||
# $CONDA is an environment variable pointing to the root of the miniconda directory
|
||||
echo $CONDA/bin >> $GITHUB_PATH
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
conda install --yes -c conda-forge python=3.8
|
||||
conda install --yes -c conda-forge matplotlib-base pyyaml openblas libgfortran gcc_linux-64 gxx_linux-64 h5py scipy pytest codecov pytest-cov spglib
|
||||
pip install https://github.com/phonopy/phonopy/archive/rc.zip --user
|
||||
- name: Set up phono3py
|
||||
run: |
|
||||
export CONDA_PREFIX=$CONDA
|
||||
python setup.py build
|
||||
pip install -e .
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest --cov=./ --cov-report=xml
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
verbose: true
|
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- rc
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
|
|
|
@ -25,6 +25,8 @@ install:
|
|||
- echo $TRAVIS_BRANCH
|
||||
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
||||
pip install https://github.com/phonopy/phonopy/archive/master.zip --user;
|
||||
elif [[ "$TRAVIS_BRANCH" == "rc" ]]; then
|
||||
pip install https://github.com/phonopy/phonopy/archive/rc.zip --user;
|
||||
else
|
||||
pip install https://github.com/phonopy/phonopy/archive/develop.zip --user;
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue