Browse Source

Use UV for the CI/CD for faster dependency resolution

tags/v0.3.9-rc1
haixuantao 1 year ago
parent
commit
458d78e7a9
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      .github/workflows/node-hub-ci-cd.yml
  2. +1
    -1
      .github/workflows/node_hub_test.sh

+ 4
- 2
.github/workflows/node-hub-ci-cd.yml View File

@@ -81,12 +81,13 @@ jobs:
with:
python-version: "3.10"

- name: Set up Poetry
- name: Set up UV and poetry
if: runner.os == 'Linux' || github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/'))
run: |
curl -sSL https://install.python-poetry.org | python3 -
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
pip install ruff pytest
uv pip install ruff pytest

- name: Set up Rust
if: runner.os == 'Linux' || github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/'))
@@ -99,6 +100,7 @@ jobs:
## Run Linting and testing only on Mac for release workflows.
if: runner.os == 'Linux' || github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/'))
run: |
alias pip="uv pip"
chmod +x ../../.github/workflows/node_hub_test.sh
../../.github/workflows/node_hub_test.sh



+ 1
- 1
.github/workflows/node_hub_test.sh View File

@@ -44,7 +44,7 @@ else
echo "Running linting and tests for Python project in $dir..."
pip install .
ruff check .
poetry run pytest
pytest
fi
fi
fi

Loading…
Cancel
Save