Skip to content

Commit

Permalink
build: Install dependencies only in Tox environments
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-c committed Jun 6, 2024
1 parent 73fc9e9 commit 7bd8401
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 29 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,14 @@ jobs:
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Install Dependencies
run: |
if [[ ${{ runner.os == 'macOS' }} ]]; then
source ./hack/activate-libomp-macos.sh
fi
poetry install --sync --only dev
- name: Install dependencies
run: poetry install --only test
- name: Test
run: |
if [[ ${{ runner.os == 'macOS' }} ]]; then
source ./hack/activate-libomp-macos.sh
fi
tox -e mlserver
poetry run tox -e mlserver
runtimes:
strategy:
Expand Down Expand Up @@ -152,18 +148,14 @@ jobs:
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Install Dependencies
run: |
if [[ ${{ runner.os == 'macOS' }} ]]; then
source ./hack/activate-libomp-macos.sh
fi
poetry install --sync --only dev
- name: Install dependencies
run: poetry install --only test
- name: Test
run: |
if [[ ${{ runner.os == 'macOS' }} ]]; then
source ./hack/activate-libomp-macos.sh
fi
tox -c ./runtimes/${{ matrix.tox-environment }}
poetry run tox -c ./runtimes/${{ matrix.tox-environment }}
# Ensure that having all the runtimes installed together works
all-runtimes:
Expand Down Expand Up @@ -209,15 +201,11 @@ jobs:
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Install Dependencies
run: |
if [[ ${{ runner.os == 'macOS' }} ]]; then
source ./hack/activate-libomp-macos.sh
fi
poetry install --sync --only dev
- name: Install dependencies
run: poetry install --only test
- name: Test
run: |
if [[ ${{ runner.os == 'macOS' }} ]]; then
source ./hack/activate-libomp-macos.sh
fi
tox -e all-runtimes
poetry run tox -e all-runtimes
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ opentelemetry-instrumentation-grpc = ">=0.43b0"
opentelemetry-exporter-otlp-proto-grpc = "^1.22.0"
pytest-lazy-fixture = "^0.6.3"

[tool.poetry.group.test.dependencies]
tox = "4.14.2"

[tool.poetry.group.dev.dependencies]
datamodel-code-generator = "0.25.5"
grpcio-tools = "1.48.2"
Expand Down

0 comments on commit 7bd8401

Please sign in to comment.