1
+ # This workflow will install Python dependencies and run tests
2
+
1
3
name : Python package
2
4
3
5
on :
4
6
push :
5
- branches : ["main"]
7
+ branches : [ "main" ]
6
8
pull_request :
7
- branches : ["main"]
9
+ branches : [ "main" ]
8
10
9
11
jobs :
10
12
build :
13
+
11
14
name : Build for (${{ matrix.python-version }}, ${{ matrix.os }})
12
15
runs-on : ${{ matrix.os }}
13
16
strategy :
@@ -17,22 +20,23 @@ jobs:
17
20
python-version : ['3.9', '3.10', '3.11', '3.12']
18
21
19
22
steps :
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 --upgrade pip
32
- python -m pip install poetry
33
- poetry lock
34
- poetry install -E dev -E rnn -E visuals
35
- - name : Verify that we can build the package
36
- run : poetry build
37
- - name : Test with pytest
38
- run : poetry run pytest
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==1.8.4
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
0 commit comments