forked from phonopy/phonopy
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.3 KB
/
phonopy-pytest-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: phonopy test using conda-forge environment
on:
push:
branches-ignore:
- publish-gh-pages
- master
- rc
pull_request:
branches: [ develop ]
jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge
channel-priority: strict
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
conda activate test
conda install --yes -c conda-forge python=${{ matrix.python-version }}
conda install --yes -c conda-forge c-compiler matplotlib-base pyyaml scipy numpy spglib h5py pip pytest codecov pytest-cov pytest
- name: Install cp2k-input-tools
run: |
conda activate test
pip install cp2k-input-tools
- name: Setup phonopy
run: |
conda activate test
pip install -e . -vvv
- name: Test with pytest
run: |
conda activate test
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
verbose: true