mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-03-17 18:22:39 -05:00
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
name: cli-e2e-tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "cmd/hatchet-cli/cli/templates/**"
|
|
- "cmd/hatchet-cli/cli/quickstart.go"
|
|
- "cmd/hatchet-cli/cli/internal/templater/**"
|
|
- "cmd/hatchet-cli/cli/quickstart_e2e_test.go"
|
|
- ".github/workflows/test-templates.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "cmd/hatchet-cli/cli/templates/**"
|
|
- "cmd/hatchet-cli/cli/quickstart.go"
|
|
- "cmd/hatchet-cli/cli/internal/templater/**"
|
|
- "cmd/hatchet-cli/cli/quickstart_e2e_test.go"
|
|
|
|
jobs:
|
|
test-templates:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.25"
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Install Poetry
|
|
run: pipx install poetry
|
|
|
|
- name: Install uv
|
|
run: pip install uv
|
|
|
|
- name: Install pnpm
|
|
run: npm install -g pnpm
|
|
|
|
- name: Install Yarn
|
|
run: npm install -g yarn
|
|
|
|
- name: Install Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Build CLI
|
|
run: |
|
|
cd cmd/hatchet-cli
|
|
go build -o hatchet-cli
|
|
sudo mv hatchet-cli /usr/local/bin/hatchet
|
|
hatchet --version
|
|
|
|
- name: Start Hatchet server
|
|
run: |
|
|
echo "Starting Hatchet server (this will wait until healthy)..."
|
|
hatchet server start --profile local --dashboard-port 8080
|
|
|
|
echo "Hatchet server is ready!"
|
|
|
|
- name: Verify local profile was created
|
|
run: |
|
|
hatchet profile list
|
|
|
|
- name: Run template E2E tests
|
|
run: |
|
|
cd cmd/hatchet-cli/cli
|
|
go test -tags e2e_cli -run TestQuickstartTemplates -v -timeout 15m
|
|
env:
|
|
# Ensure tests don't try to interact with stdin
|
|
CI: true
|
|
|
|
- name: Show server logs on failure
|
|
if: failure()
|
|
run: |
|
|
echo "=== Hatchet Container Logs ==="
|
|
docker logs hatchet-cli-hatchet-1 2>&1 || echo "Could not get hatchet container logs"
|
|
echo ""
|
|
echo "=== Postgres Container Logs ==="
|
|
docker logs hatchet-cli-postgres-1 2>&1 || echo "Could not get postgres container logs"
|
|
echo ""
|
|
echo "=== All Containers ==="
|
|
docker ps -a
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
# Stop Hatchet server (this will stop the containers)
|
|
hatchet server stop --profile local || true
|
|
|
|
# Cleanup any remaining docker containers
|
|
docker ps -q --filter "label=com.docker.compose.project=hatchet-cli" | xargs -r docker stop || true
|
|
docker ps -aq --filter "label=com.docker.compose.project=hatchet-cli" | xargs -r docker rm || true
|