Skip to content

bump version to v0.0.17 #211

bump version to v0.0.17

bump version to v0.0.17 #211

Workflow file for this run

name: E2E (Web + CLI, shared image)
on:
push:
branches: [main]
pull_request:
jobs:
build-image:
runs-on: ubuntu-latest
env:
GATEWAY_IMAGE: rack-gateway-api:e2e-${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build gateway image (with web UI) and export
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
tags: ${{ env.GATEWAY_IMAGE }}
build-args: |
COMMIT_SHA=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
load: false
outputs: type=docker,dest=${{ runner.temp }}/gateway-api.tar
- name: Upload image artifact
uses: actions/upload-artifact@v4
with:
name: gateway-image
path: ${{ runner.temp }}/gateway-api.tar
retention-days: 1
web-e2e:
runs-on: ubuntu-latest
needs: build-image
env:
WEB_PORT: 9447
GATEWAY_PORT: 9447
MOCK_OAUTH_PORT: 9345
MOCK_CONVOX_PORT: 6443
GATEWAY_DEBUG_OAUTH: "false"
CHECK_VITE_PROXY: "false"
GATEWAY_IMAGE: rack-gateway-api:e2e-${{ github.sha }}
E2E_DATABASE_URL: postgres://postgres:postgres@localhost:55432/gateway_test?sslmode=disable
WEB_E2E_SHARDS: 1
PLAYWRIGHT_WORKERS: 1
CGO_ENABLED: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Task
run: |
curl -sL https://taskfile.dev/install.sh | sh -s -- -b /usr/local/bin
task --version
- name: Install libfido2 dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfido2-dev libudev-dev pkg-config
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.1"
- name: Download gateway image
uses: actions/download-artifact@v4
with:
name: gateway-image
path: ${{ runner.temp }}
- name: Load gateway image
run: |
docker load --input ${{ runner.temp }}/gateway-api.tar
docker image ls -a | grep rack-gateway-api || true
- name: Build mock services
run: task docker:build:mocks
- name: Pull dependent images
run: docker compose pull postgres || docker pull postgres:16-alpine
- name: Ensure database exists
run: task db:ensure
- name: Start stack (gateway serves UI)
run: task docker:test:up
- name: Wait for services
run: |
chmod +x scripts/wait-for-services.sh
WEB_UI_PATH='/app/' WEB_PORT=${GATEWAY_PORT} CHECK_VITE_PROXY=false bash scripts/wait-for-services.sh
- name: Diagnose endpoints
run: |
set -x
docker compose ps
curl -sv http://127.0.0.1:${GATEWAY_PORT}/api/v1/health || true
curl -sv http://127.0.0.1:${GATEWAY_PORT}/app/login -o /dev/null || true
- name: Install Playwright and deps
working-directory: web
run: |
bun install --frozen-lockfile
bunx playwright install --with-deps || bunx playwright install
- name: Run Web E2E
working-directory: web
run: bun run e2e
- name: Docker logs (on failure)
if: failure()
run: docker compose --profile test logs --no-color --timestamps
- name: Teardown
if: always()
run: task docker:down
cli-e2e:
runs-on: ubuntu-latest
needs: build-image
env:
TEST_GATEWAY_PORT: 9447
TEST_MOCK_OAUTH_PORT: 9345
TEST_MOCK_CONVOX_PORT: 6443
GATEWAY_TEST_IMAGE: rack-gateway-api:e2e-${{ github.sha }}
WEB_UI_PATH: "/app/"
CHECK_VITE_PROXY: false
CGO_ENABLED: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Task
run: |
curl -sL https://taskfile.dev/install.sh | sh -s -- -b /usr/local/bin
task --version
- name: Install libfido2 dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfido2-dev libudev-dev pkg-config
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.25.5"
- name: Download gateway image
uses: actions/download-artifact@v4
with:
name: gateway-image
path: ${{ runner.temp }}
- name: Load gateway image
run: |
docker load --input ${{ runner.temp }}/gateway-api.tar
docker image ls -a | grep rack-gateway-api || true
- name: Build mock services
run: task docker:build:mocks
- name: Pull dependent images
run: docker compose pull postgres || docker pull postgres:16-alpine
- name: Ensure database exists
run: task db:ensure
- name: Start stack (gateway serves UI)
run: task docker:test:up
- name: Wait for services
run: |
GATEWAY_PORT=9447 WEB_PORT=9447 MOCK_OAUTH_PORT=9345 CHECK_VITE_PROXY=false ./scripts/wait-for-services.sh
- name: Install Convox CLI
run: |
set -euo pipefail
ARCH=$(uname -m)
URL="https://github.com/convox/convox/releases/latest/download/convox-linux"
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
URL="https://github.com/convox/convox/releases/latest/download/convox-linux-arm64"
fi
curl -fsSL "$URL" -o /tmp/convox
sudo mv /tmp/convox /usr/local/bin/convox
sudo chmod 755 /usr/local/bin/convox
convox version || true
- name: Run CLI E2E
run: GATEWAY_PORT=9447 MOCK_OAUTH_PORT=9345 MOCK_CONVOX_PORT=6443 E2E_DATABASE_NAME=gateway_test E2E_GATEWAY_SERVICE=gateway-api-test ./scripts/cli-e2e.sh
- name: Docker logs (on failure)
if: failure()
run: docker compose --profile test logs --no-color --timestamps
- name: Teardown
if: always()
run: task docker:down