Skip to content

Commit 4c4d4e0

Browse files
committed
update build
1 parent ccd78ed commit 4c4d4e0

File tree

1 file changed

+20
-25
lines changed

1 file changed

+20
-25
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# This workflow will install Python dependencies and run tests
2-
31
name: Python package
42

53
on:
64
push:
7-
branches: [ "main" ]
5+
branches: ["main"]
86
pull_request:
9-
branches: [ "main" ]
7+
branches: ["main"]
108

119
jobs:
1210
build:
13-
1411
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
1512
runs-on: ${{ matrix.os }}
1613
strategy:
@@ -20,23 +17,21 @@ jobs:
2017
python-version: ['3.9', '3.10', '3.11', '3.12']
2118

2219
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

Comments
 (0)