Commit 7c2dc58 1 parent 1a295e2 commit 7c2dc58 Copy full SHA for 7c2dc58
File tree 5 files changed +28
-55
lines changed
actions/install-python-and-package
5 files changed +28
-55
lines changed Original file line number Diff line number Diff line change
1
+ name : " Install Python and DIANNA"
2
+ description : " Installs Python, updates pip and installs DIANNA together with its dependencies."
3
+ inputs :
4
+ python-version :
5
+ required : false
6
+ description : " The Python version to use. Specify major and minor version, e.g. '3.9'."
7
+ default : " 3.9"
8
+ runs :
9
+ using : " composite"
10
+ steps :
11
+ - name : Set up Python ${{ inputs.python-version }}
12
+ uses : actions/setup-python@v2
13
+ with :
14
+ python-version : ${{ inputs.python-version }}
15
+ - name : Python info
16
+ shell : bash -l {0}
17
+ run : |
18
+ which python3
19
+ python3 --version
20
+ - name : Upgrade pip and install dependencies
21
+ run : |
22
+ python3 -m pip install --upgrade pip setuptools
23
+ python3 -m pip install .[dev,publishing]
Original file line number Diff line number Diff line change @@ -20,23 +20,11 @@ jobs:
20
20
python-version : ['3.7', '3.8', '3.9']
21
21
steps :
22
22
- uses : actions/checkout@v2
23
- - name : Set up Python ${{ matrix.python-version }}
24
- uses : actions/setup-python@v2
23
+ - uses : ./.github/actions/install-python-and-package
25
24
with :
26
25
python-version : ${{ matrix.python-version }}
27
- - name : Python info
28
- shell : bash -l {0}
29
- run : |
30
- which python3
31
- python3 --version
32
- - name : Upgrade pip and install dependencies
33
- run : |
34
- python3 -m pip install --upgrade pip setuptools
35
- python3 -m pip install .[dev,publishing]
36
26
- name : Run unit tests
37
27
run : pytest -v
38
- - name : Run tutorial notebooks
39
- run : pytest --nbmake tutorials
40
28
- name : Verify that we can build the package
41
29
run : python3 setup.py sdist bdist_wheel
42
30
- name : Build documentation
Original file line number Diff line number Diff line change 17
17
fail-fast : false
18
18
steps :
19
19
- uses : actions/checkout@v2
20
- - name : Set up Python 3.9
21
- uses : actions/setup-python@v2
22
- with :
23
- python-version : 3.9
24
- - name : Python info
25
- shell : bash -l {0}
26
- run : |
27
- which python3
28
- python3 --version
29
- - name : Upgrade pip and install dependencies
30
- run : |
31
- python3 -m pip install --upgrade pip setuptools
32
- python3 -m pip install .[dev,publishing]
20
+ - uses : ./.github/actions/install-python-and-package
33
21
- name : Check style against standards using prospector
34
22
run : prospector
35
23
- name : Check import order
Original file line number Diff line number Diff line change 13
13
steps :
14
14
- uses : actions/checkout@v2
15
15
16
- - uses : actions/setup-python@v2
17
- name : Install Python
18
- with :
19
- python-version : ' 3.9'
20
-
21
- - name : Upgrade pip and install dependencies
22
- run : |
23
- python3 -m pip install --upgrade pip setuptools
24
- python3 -m pip install .[publishing]
16
+ - uses : ./.github/actions/install-python-and-package
25
17
26
18
- name : Build wheel
27
19
run : python setup.py bdist_wheel
36
28
steps :
37
29
- uses : actions/checkout@v2
38
30
39
- - uses : actions/setup-python@v2
40
- name : Install Python
41
- with :
42
- python-version : ' 3.9'
43
-
44
- - name : Upgrade pip and install dependencies
45
- run : |
46
- python3 -m pip install --upgrade pip setuptools
47
- python3 -m pip install .[publishing]
31
+ - uses : ./.github/actions/install-python-and-package
48
32
49
33
- name : Build sdist
50
34
run : python setup.py sdist
Original file line number Diff line number Diff line change 18
18
- uses : actions/checkout@v2
19
19
with :
20
20
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
21
- - name : Set up Python
22
- uses : actions/setup-python@v2
23
- with :
24
- python-version : 3.9
25
- - name : Python info
26
- shell : bash -l {0}
27
- run : |
28
- which python3
29
- python3 --version
30
- - name : Install dependencies
31
- run : python3 -m pip install .[dev]
21
+ - uses : ./.github/actions/install-python-and-package
32
22
- name : Check style against standards using prospector
33
23
run : prospector --zero-exit --output-format grouped --output-format pylint:pylint-report.txt
34
24
- name : Run unit tests with coverage
You can’t perform that action at this time.
0 commit comments