-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.32 KB
/
python-app.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches:
- main
- dev
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10 with conda
uses: actions/setup-python@v3
with:
python-version: "3.10"
- 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 conda-forge::gsl
conda install conda-forge::dftbplus
python -m pip install --upgrade pip
pip install .
- name: Test with pytest
run: |
pip install '.[test]'
python -m pytest --cov=ThermoScreening --cov-report=xml
shell: bash
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
verbose: true