Skip to content

Commit

Permalink
ci: don't install test-only dependencies when we don't need them
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaci committed Feb 2, 2025
1 parent 03b33d4 commit 6e07439
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/setup-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ inputs:
description: "Python version to setup"
required: false
default: "3.9"
install-test-deps:
description: "Wether to install 3rd Party dependencies (for tests)"
required: false
default: "true" # unfortunately boolean variables are not supported

name: "Setup dependencies"
description: "Install all required dependencies for worflows to run."
runs:
using: "composite"
steps:
- name: Install 3rd party dependencies
- if: inputs.install-test-deps == 'true'
name: Install 3rd party dependencies
run: sudo ./install-deps.sh
shell: bash

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:

- name: Setup 3rd party dependencies
uses: ./.github/actions/setup-dependencies
with:
install-test-deps: "false"

- name: Setup Nix
uses: cachix/install-nix-action@v30
Expand Down Expand Up @@ -256,6 +258,8 @@ jobs:

- name: Setup 3rd party dependencies
uses: ./.github/actions/setup-dependencies
with:
install-test-deps: "false"

- name: Build sdist
uses: PyO3/maturin-action@v1
Expand Down

0 comments on commit 6e07439

Please sign in to comment.