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
  •  
  •  
  •  
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- id: get_tag
run: |
Expand All @@ -111,14 +112,14 @@ jobs:

# Build browser JS bundle
cd packages/karriojs
npm install
npm ci
npx gulp build --output "${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/js/karrio.js"
cd -

- name: Build embeddable elements
run: |
cd packages/elements
npm install
npm ci
npm run build

# Copy built elements to Django static directory
Expand Down Expand Up @@ -163,15 +164,28 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- id: get_tag
run: |
cat ./apps/api/karrio/server/VERSION
echo "tag=$(cat ./apps/api/karrio/server/VERSION)" >> "$GITHUB_ENV"

- name: Build karrio dashboard image
run: |
echo 'Building karrio dashboard:${{ env.tag }}...'
./bin/build-dashboard-image ${{ env.tag }}
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/dashboard/Dockerfile
push: false
load: true
tags: karrio/dashboard:${{ env.tag }}
build-args: |
VERSION=${{ env.tag }}
NEXT_PUBLIC_DASHBOARD_VERSION=${{ env.tag }}
SOURCE=https://github.com/karrioapi/karrio
cache-from: type=gha,scope=dashboard
cache-to: type=gha,mode=max,scope=dashboard

- name: Push karrio dashboard image
run: |
Expand Down
28 changes: 21 additions & 7 deletions .github/workflows/insiders-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- id: get_tag
run: |
Expand All @@ -112,14 +113,14 @@ jobs:
--additional-properties=useSingleRequestParameter=true

cd packages/karriojs
npm install
npm ci
npx gulp build --output "${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/js/karrio.js"
cd -

- name: Build embeddable elements
run: |
cd packages/elements
npm install
npm ci
npm run build

ELEMENTS_STATIC="${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/elements"
Expand Down Expand Up @@ -156,14 +157,27 @@ jobs:
submodules: recursive
token: ${{ secrets.GH_PAT }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- id: get_tag
run: |
cat ./apps/api/karrio/server/VERSION
echo "tag=$(cat ./apps/api/karrio/server/VERSION)" >> "$GITHUB_ENV"

- name: Login to GHCR
run: echo ${{ secrets.GH_PAT }} | docker login ghcr.io -u USERNAME --password-stdin

- name: Build insider dashboard image
run: |
echo 'Build and push karrio-insiders dashboard:${{ env.tag }}...'
echo ${{ secrets.GH_PAT }} | docker login ghcr.io -u USERNAME --password-stdin
KARRIO_IMAGE=ghcr.io/karrioapi/dashboard SOURCE=https://github.com/karrioapi/karrio-insiders ./bin/build-dashboard-image ${{ env.tag }} &&
docker push ghcr.io/karrioapi/dashboard:${{ env.tag }} || exit 1
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/dashboard/Dockerfile
push: true
tags: ghcr.io/karrioapi/dashboard:${{ env.tag }}
build-args: |
VERSION=${{ env.tag }}
NEXT_PUBLIC_DASHBOARD_VERSION=${{ env.tag }}
SOURCE=https://github.com/karrioapi/karrio-insiders
cache-from: type=gha,scope=insiders-dashboard
cache-to: type=gha,mode=max,scope=insiders-dashboard
11 changes: 9 additions & 2 deletions .github/workflows/platform-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- id: get_tag
run: |
Expand All @@ -57,14 +58,14 @@ jobs:
--additional-properties=useSingleRequestParameter=true

cd packages/karriojs
npm install
npm ci
npx gulp build --output "${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/js/karrio.js"
cd -

- name: Build embeddable elements
run: |
cd packages/elements
npm install
npm ci
npm run build

ELEMENTS_STATIC="${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/elements"
Expand Down Expand Up @@ -126,6 +127,12 @@ jobs:
submodules: recursive
token: ${{ secrets.GH_PAT }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,76 @@ jobs:
- name: Build
working-directory: packages/mcp
run: npm run build

e2e:
# Required gate on any `refs/tags/2026.*` push. PRs and branch pushes
# also run the suite so regressions surface before tag cuts.
runs-on: ubuntu-latest
timeout-minutes: 40

steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Checkout submodules (shallow)
run: git submodule update --init --depth=1 community

- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install workspace dependencies
run: npm ci

- name: Start stack (api + dashboard + stubbed carrier + db)
run: docker compose -f docker-compose.e2e.yml up -d --wait
env:
KARRIO_TAG: ${{ github.ref_name == 'main' && 'latest' || 'latest' }}

- name: Install Playwright browsers
working-directory: packages/e2e
run: npx playwright install --with-deps chromium firefox

- name: Seed test tenant
working-directory: packages/e2e
run: npx tsx scripts/seed.ts
env:
KARRIO_API_URL: http://localhost:5002
KARRIO_DASHBOARD_URL: http://localhost:3002

- name: Run Playwright smoke suite
working-directory: packages/e2e
run: npx playwright test specs/
env:
CI: "true"
KARRIO_API_URL: http://localhost:5002
KARRIO_DASHBOARD_URL: http://localhost:3002

- name: Collect docker logs on failure
if: failure()
run: docker compose -f docker-compose.e2e.yml logs --no-color > docker-logs.txt || true

- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ github.run_attempt }}
path: packages/e2e/playwright-report
retention-days: 14

- name: Upload traces + videos on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-artifacts-${{ github.run_attempt }}
path: |
packages/e2e/test-results
docker-logs.txt
retention-days: 14

- name: Tear down stack
if: always()
run: docker compose -f docker-compose.e2e.yml down -v
Loading
Loading