1
- # This workflow will install Python dependencies and run tests
2
-
3
1
name : Python package
4
2
5
3
on :
6
4
push :
7
- branches : [ "main" ]
5
+ branches : ["main"]
8
6
pull_request :
9
- branches : [ "main" ]
7
+ branches : ["main"]
10
8
11
9
jobs :
12
10
build :
13
-
14
11
name : Build for (${{ matrix.python-version }}, ${{ matrix.os }})
15
12
runs-on : ${{ matrix.os }}
16
13
strategy :
@@ -20,23 +17,21 @@ jobs:
20
17
python-version : ['3.9', '3.10', '3.11', '3.12']
21
18
22
19
steps :
23
- - uses : actions/checkout@v3
24
- - name : Set up Python ${{ matrix.python-version }}
25
- uses : actions/setup-python@v3
26
- with :
27
- python-version : ${{ matrix.python-version }}
28
-
29
- - uses : actions/cache@v3
30
- with :
31
- path : ${{ env.pythonLocation }}
32
- key : ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}
33
-
34
- - name : Install dependencies
35
- run : |
36
- python -m pip install poetry
37
- poetry lock --no-update
38
- poetry install -E dev -E rnn -E visuals
39
- - name : Verify that we can build the package
40
- run : poetry build
41
- - name : Test with pytest
42
- run : poetry run pytest
20
+ - uses : actions/checkout@v3
21
+ - name : Set up Python ${{ matrix.python-version }}
22
+ uses : actions/setup-python@v3
23
+ with :
24
+ python-version : ${{ matrix.python-version }}
25
+ - uses : actions/cache@v3
26
+ with :
27
+ path : ~/.cache/pip
28
+ key : ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
29
+ - name : Install dependencies
30
+ run : |
31
+ python -m pip install poetry
32
+ poetry lock --no-update
33
+ poetry install -E dev -E rnn -E visuals
34
+ - name : Verify that we can build the package
35
+ run : poetry build
36
+ - name : Test with pytest
37
+ run : poetry run pytest
0 commit comments