Skip to content

sync / Gateway staging -> main for Hummingbot version 2.13.0 #2135

sync / Gateway staging -> main for Hummingbot version 2.13.0

sync / Gateway staging -> main for Hummingbot version 2.13.0 #2135

Workflow file for this run

# This is a basic workflow that is manually triggered
name: ci
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
push:
branches: [main, development, 'refactor/unit_tests**', 'epic/**']
pull_request:
branches: [main, development, 'refactor/unit_tests**', 'epic/**']
types: [ready_for_review, opened, synchronize, reopened]
jobs:
run_gateway:
name: Check if gateway files changed
outputs:
is_set: ${{ steps.check_files.outputs.is_set }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/*.+(ts|js|yml)
!Dockerfile
!*.sh
- name: Check if gateway files are modified
id: check_files
if: env.GIT_DIFF
run: |
echo ${{ env.GIT_DIFF }}
echo "is_set=true" >> $GITHUB_OUTPUT
build_gateway:
name: Gateway build + unit tests
needs: run_gateway
if: github.event.pull_request.draft == false && needs.run_gateway.outputs.is_set == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v4.1.1
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install --no-frozen-lockfile
- name: Build project
run: pnpm build
- name: Setup configuration for CI
run: |
mkdir -p conf/
# Copy template configurations
cp -rf src/templates/* conf/
- name: Run unit test coverage
if: github.event_name == 'pull_request'
shell: bash
run: |
GATEWAY_TEST_MODE=dev NODE_OPTIONS=--trace-warnings pnpm test || {
echo "Tests failed with exit code $?"
cat $(find ./.jest-coverage -name "*.log" 2>/dev/null) 2>/dev/null || true
exit 1
}
# Docker build and push is handled by the separate docker_buildx_workflow.yml