Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file added .gitattributes
Empty file.
43 changes: 10 additions & 33 deletions .github/actions/install_env_and_hb/action.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
name: "Install environment and Hummingbot"
description: "Installs conda environment, all libraries and compiles Hummingbot"
description: "Installs pixi environment and compiles Hummingbot"
inputs:
program-cache-hit:
required: true
description: "Value of truth regarding the program cache being hit or not"
dependencies-cache-hit:
required: true
description: "Value of truth regarding the program cache being hit or not"
runs:
using: "composite"
steps:
# Install python/conda to check if core code has changed
- uses: actions/setup-python@v4
if: ${{inputs.program-cache-hit}} != 'true' || ${{inputs.dependencies-cache-hit}} != 'true'
- name: Set up pixi
if: ${{inputs.program-cache-hit}} != 'true'
uses: prefix-dev/setup-pixi@v0.9.6
with:
python-version: 3.x

# Install pre_commit if code has changed
- name: Install pre_commit
if: ${{inputs.program-cache-hit}} != 'true' || ${{inputs.dependencies-cache-hit}} != 'true'
shell: bash
run: |
conda install -c conda-forge pre_commit

# Install hummingbot env if environment.yml has changed
- name: Install Hummingbot
if: ${{inputs.dependencies-cache-hit}} != 'true'
shell: bash -l {0}
run: |
./install
environments: ci
cache: true
locked: false

# Compile and run tests if code has changed
- name: Compile Hummingbot
- name: Build Hummingbot
shell: bash
if: ${{inputs.program-cache-hit}} != 'true' || ${{inputs.dependencies-cache-hit}} != 'true'
env:
WITHOUT_CYTHON_OPTIMIZATIONS: 'true'
run: |
source $CONDA/etc/profile.d/conda.sh
conda info --envs
conda activate hummingbot
conda env export
./compile
if: ${{inputs.program-cache-hit}} != 'true'
run: pixi run -e ci build
29 changes: 29 additions & 0 deletions .github/test-selection/run-changed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Fast diff-driven test run vs origin/ci-base.
# Selects tests touched by the branch's diff, then runs pixi pytest.
set -euo pipefail

REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT"

SELECTED="$(mktemp)"
trap 'rm -f "$SELECTED"' EXIT

python3 .github/test-selection/select_tests.py \
--mode branch \
--base-ref origin/ci-base \
--head-ref HEAD \
--config .github/test-selection/test-selection-map.yaml \
--repo . \
--no-history > "$SELECTED"

if [ ! -s "$SELECTED" ]; then
echo "No tests touched by diff — quick check passes."
exit 0
fi

echo "Selected $(wc -l < "$SELECTED") test files:"
cat "$SELECTED"
echo "---"

exec pixi run -e ci pytest $(cat "$SELECTED") -v --tb=short
Loading
Loading