-
Notifications
You must be signed in to change notification settings - Fork 8
196 lines (165 loc) · 5.67 KB
/
ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: aiida-fleur
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: docs
sphinx-options: ''
allow-failure: true
- name: docs-nitpicky
sphinx-options: '-nW'
allow-failure: true
name: ${{ matrix.name }}
continue-on-error: ${{ matrix.allow-failure }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-docs-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-docs-
- name: Install python dependencies
run: |
pip install -e .[docs]
reentry scan || true
- name: Build documentation
env:
READTHEDOCS: 'True'
SPHINXOPTS: ${{ matrix.sphinx-options }}
run: |
make -C docs html
pre-commit:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-pre-commit-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-pre-commit-
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install python dependencies
run: |
pip install .[pre-commit,testing]
pip freeze
- name: Run pre-commit
run: |
pre-commit run --all-files || (git status --short; git diff ; exit 1)
tests:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
aiida: [{version: 'aiida-core==2.0.1', name: '2.0.1'},{version: 'aiida-core==2.3.0', name: '2.3.0'}]
masci-tools: [{version: 'masci-tools', name: 'stable'}]
bokeh-version: ['bokeh==3.0.3']
mpl-version: ['matplotlib==3.6.3']
add-name: ['']
allowed-to-fail: [false]
include:
- python-version: "3.11"
aiida: {version: 'aiida-core==2.3.0', name: '2.3.0'}
masci-tools: {version: 'masci-tools', name: 'stable'}
bokeh-version: 'bokeh==3.0.3'
mpl-version: 'matplotlib==3.6.3'
add-name: ''
allowed-to-fail: false
- python-version: 3.9
aiida: {version: 'git+https://github.com/aiidateam/aiida-core.git@main', name: 'latest'}
masci-tools: {version: 'masci-tools', name: 'stable'}
bokeh-version: 'bokeh==3.0.3'
mpl-version: 'matplotlib==3.6.3'
add-name: ''
allowed-to-fail: true
- python-version: 3.9
aiida: {version: 'aiida-core==2.0.1', name: '2.0.1'}
masci-tools: {version: 'git+https://github.com/JuDFTteam/masci-tools.git@develop', name: 'develop'}
bokeh-version: 'bokeh==3.0.3'
mpl-version: 'matplotlib==3.6.3'
add-name: ''
allowed-to-fail: true
- python-version: 3.9
aiida: {version: 'aiida-core==2.0.1', name: '2.0.1'}
masci-tools: {version: 'masci-tools', name: 'stable'}
bokeh-version: 'bokeh'
mpl-version: 'matplotlib'
add-name: '-latest-bokeh/mpl'
allowed-to-fail: true
fail-fast: false
name: ${{ matrix.python-version }}-aiida-${{ matrix.aiida.name }}-masci-${{ matrix.masci-tools.name }}${{ matrix.add-name }}
continue-on-error: ${{ matrix.allowed-to-fail }}
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:
- 5672:5672
steps:
- uses: actions/checkout@v2
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ matrix.aiida.name }}-tests-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ matrix.aiida.name }}-tests
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt update
sudo apt install postgresql
- name: Install python dependencies
run: |
pip install --upgrade wheel setuptools
pip install git+https://github.com/aiidateam/aiida-testing.git@main
pip install --no-deps git+https://github.com/aiidateam/aiida-common-workflows.git@master
pip install .[testing,graphs]
pip install ${{ matrix.aiida.version }} ${{ matrix.masci-tools.version }}
pip install ${{ matrix.bokeh-version }} ${{ matrix.mpl-version }}
reentry scan || true
- name: Run pytest
run: |
cd ./tests/
# create fake codes for tests to work on ci
touch local_exe/inpgen && chmod +x local_exe/inpgen
touch local_exe/fleur && chmod +x local_exe/fleur
./run_all_cov.sh --local-exe-hdf5
- name: Upload report to Codecov
uses: codecov/codecov-action@v1
with:
file: ./tests/coverage.xml
fail_ci_if_error: False
- uses: actions/upload-artifact@v3
if: failure()
with:
name: matplotlib-comparison-${{ matrix.python-version }}
path: tests/mpl-results