-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 1.67 KB
/
Copy pathpython-app.yml
File metadata and controls
65 lines (59 loc) · 1.67 KB
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
name: Python application
on:
push:
branches:
- main
- dev
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Cache DFTB+ parameters
uses: actions/cache@v6
with:
path: ~/.local/share/thermoscreening/slakos/3ob-3-1
key: dftbparams-3ob-3-1-v1
- 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 -y -c conda-forge python=3.12 gsl 'dftbplus=25.1=nompi_*'
python -m pip install --upgrade pip
python -m pip install '.[test,lint]'
- name: Verify DFTB+ workflow
env:
THERMOSCREENING_REQUIRE_DFTB: "1"
run: |
thermo setup-dftb --parameter-set 3ob
thermo doctor --engine dftb+
python -m pytest tests/integration/test_dftb_workflow.py -q
- name: Lint with Pylint
run: python -m pylint ThermoScreening
- name: Test with pytest
run: python -m pytest --cov=ThermoScreening --cov-report=xml
- name: Build package
run: |
python -m pip install build
python -m build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
flags: unittests
verbose: true