Skip to content

Commit b3f1927

Browse files
committed
Merge branch 'main' into feat/create-MCP-mvp
2 parents 7d00e69 + bbb4a26 commit b3f1927

19 files changed

+598
-150
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ jobs:
2121
- name: Install dependencies
2222
run: npm ci
2323

24+
- name: Run Vitest Tests
25+
run: npm run test:vi
26+
2427
- name: Build
2528
run: npm run build
2629

2730
- name: Run Cypress Tests
28-
run: npm run test
31+
run: npm run test:cy
2932

3033
- name: Upload Cypress Screenshots
3134
if: always() # Run this step even if tests fail
@@ -36,4 +39,3 @@ jobs:
3639
cypress/screenshots/
3740
retention-days: 7 # Keep artifacts for 7 days
3841
if-no-files-found: warn # Warn instead of fail if no screenshots found
39-

.github/workflows/clean-main-images.yml

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,31 @@ on:
44
schedule:
55
- cron: '5 1 * * *'
66
workflow_dispatch:
7+
inputs:
8+
dry-run:
9+
description: 'Dry run'
10+
required: false
11+
default: true
12+
type: 'boolean'
713

814
env:
9-
REGISTRY: ghcr.io
10-
ORG: openmcp-project
1115
IMAGE_NAME: mcp-ui-frontend
1216
KEEP_X_IMAGES: 5
1317
TAG_PREFIX: 'main-'
1418

1519
jobs:
1620
clean:
17-
name: 'Clean main images'
21+
name: Clean main images
1822
runs-on: ubuntu-latest
1923
permissions:
2024
packages: write
21-
env:
22-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2325
steps:
24-
- name: List all ${{ env.TAG_PREFIX }} tags and their version IDs (debug)
25-
run: |
26-
gh api -H "Accept: application/vnd.github+json" \
27-
/orgs/${{ env.ORG }}/packages/container/${{ env.IMAGE_NAME }}/versions \
28-
--paginate | jq -r '.[] | select(.metadata.container.tags[] | startswith("${{ env.TAG_PREFIX }}")) | "\(.id) \(.metadata.container.tags[])"' | grep '^.* ${{ env.TAG_PREFIX }}' | sort -k2 -r
29-
30-
- name: Delete old ${{ env.TAG_PREFIX }}* tags using GitHub API, keep ${{ env.KEEP_X_IMAGES }}
31-
run: |
32-
set -e
33-
set -o pipefail
34-
35-
# Get all ${{ env.TAG_PREFIX }}* tags and their version IDs, sorted by tag (descending)
36-
VERSIONS=$(gh api -H "Accept: application/vnd.github+json" \
37-
/orgs/${{ env.ORG }}/packages/container/${{ env.IMAGE_NAME }}/versions \
38-
--paginate | jq -r '.[] | select(.metadata.container.tags[] | startswith("${{ env.TAG_PREFIX }}")) | "\(.id) \(.metadata.container.tags[])"' | grep '^.* ${{ env.TAG_PREFIX }}' | sort -k2 -r)
39-
40-
# Get the lines to delete (skip the first ${{ env.KEEP_X_IMAGES }} versions)
41-
TO_DELETE=$(echo "$VERSIONS" | sed "1,${{ env.KEEP_X_IMAGES }}d")
42-
43-
echo "Deleting the following tags:"
44-
echo "$TO_DELETE" | awk '{print $2}'
45-
46-
if [ -z "$TO_DELETE" ]; then
47-
echo "No tags to delete."
48-
exit 0
49-
fi
50-
51-
FAILED_DELETIONS=""
52-
while read -r line; do
53-
id=$(echo "$line" | awk '{print $1}')
54-
tag=$(echo "$line" | awk '{print $2}')
55-
echo "Deleting tag $tag (version ID $id)"
56-
if ! gh api -X DELETE -H "Accept: application/vnd.github+json" \
57-
/orgs/${{ env.ORG }}/packages/container/${{ env.IMAGE_NAME }}/versions/$id; then
58-
echo "Failed to delete version $id ($tag)"
59-
FAILED_DELETIONS="${FAILED_DELETIONS}\n$id ($tag)"
60-
fi
61-
done <<< "$TO_DELETE"
62-
63-
if [ -n "$FAILED_DELETIONS" ]; then
64-
echo -e "The following deletions failed:\n$FAILED_DELETIONS"
65-
exit 1
66-
fi
67-
- name: List remaining ${{ env.TAG_PREFIX }}* tags and their version IDs (debug)
68-
run: |
69-
gh api -H "Accept: application/vnd.github+json" \
70-
/orgs/${{ env.ORG }}/packages/container/${{ env.IMAGE_NAME }}/versions \
71-
--paginate | jq -r '.[] | select(.metadata.container.tags[] | startswith("${{ env.TAG_PREFIX }}")) | "\(.id) \(.metadata.container.tags[])"' | grep '^.* ${{ env.TAG_PREFIX }}' | sort -k2 -r
26+
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 #v1
27+
with:
28+
dry-run: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry-run == 'true' }}
29+
packages: ${{ env.IMAGE_NAME }}
30+
delete-tags: ${{ env.TAG_PREFIX }}
31+
delete-untagged: true
32+
keep-n-tagged: ${{ env.KEEP_X_IMAGES }}
33+
delete-ghost-images: true
34+
delete-partial-images: true

.github/workflows/main.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
platforms: linux/amd64,linux/arm64
5757
push: true
5858
sbom: true
59-
provenance: mode=max
6059
tags: ${{ steps.meta.outputs.tags }}
6160
labels: ${{ steps.meta.outputs.labels }}
6261
annotations: ${{ steps.meta.outputs.annotations }}

.github/workflows/on-release.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,20 @@ jobs:
5555
username: ${{ github.actor }}
5656
password: ${{ secrets.GITHUB_TOKEN }}
5757

58+
- name: Set up QEMU
59+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
60+
61+
- name: Set up Docker Buildx
62+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 #v3.10.0
63+
5864
- name: Build and push Docker image
5965
id: push
6066
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6167
with:
6268
context: .
69+
platforms: "linux/amd64,linux/arm64"
6370
push: true
6471
sbom: true
65-
provenance: mode=max
6672
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.nextVersion }}
6773

6874
- name: Create Release with autogenerated release notes

cypress.config.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,22 @@
1-
import {defineConfig} from "cypress";
1+
import { defineConfig } from 'cypress';
22

3-
import {defineConfig as defineViteConfig} from 'vite';
3+
import { defineConfig as defineViteConfig } from 'vite';
44

55
import react from '@vitejs/plugin-react';
66

77
const viteConfig = defineViteConfig({
8-
plugins: [
9-
react(),
10-
],
8+
plugins: [react()],
119
});
1210
export default defineConfig({
1311
includeShadowDom: true,
1412
viewportWidth: 1920,
1513
viewportHeight: 1080,
1614
component: {
1715
devServer: {
18-
framework: "react",
19-
bundler: "vite",
16+
framework: 'react',
17+
bundler: 'vite',
2018
viteConfig: viteConfig,
2119
},
22-
specPattern: "**/*.test.{js,ts,jsx,tsx}",
23-
},
24-
25-
e2e: {
26-
baseUrl: "http://localhost:5173/",
27-
setupNodeEvents() {
28-
// implement node event listeners here
29-
},
20+
specPattern: '**/*.cy.{js,ts,jsx,tsx}',
3021
},
3122
});

0 commit comments

Comments
 (0)