Skip to content

Commit 7c6a93a

Browse files
authored
Merge branch 'main' into milinda/cacheTag-initial
2 parents 5937f01 + cfcefd3 commit 7c6a93a

307 files changed

Lines changed: 27929 additions & 9764 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/connect/ @wundergraph/Router
1515
/connect-go/ @wundergraph/Router
1616
/controlplane/ @wundergraph/Cosmo
17-
/graphqlmetrics/ @wundergraph/Platform
17+
/graphqlmetrics/ @wundergraph/Platform @wundergraph/Router
1818
/helm/ @wundergraph/Platform
1919
/infrastructure/ @wundergraph/Platform
2020
/keycloak/ @wundergraph/Cosmo

.github/actions/cli-build/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ runs:
2626
bun-version: '1.2.19'
2727

2828
- name: Setup Node
29-
uses: ./.github/actions/node
29+
uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
30+
with:
31+
cache: true
32+
install: false
3033

3134
- name: Generate outfile name
3235
id: outfile

.github/actions/node/action.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
redis:
3+
image: redis:7
4+
ports:
5+
- '6379:6379'
6+
healthcheck:
7+
test: ['CMD', 'redis-cli', 'ping']
8+
interval: 10s
9+
timeout: 5s
10+
retries: 5
11+
12+
postgres:
13+
image: postgres:15
14+
ports:
15+
- '5432:5432'
16+
environment:
17+
POSTGRES_USER: postgres
18+
POSTGRES_PASSWORD: changeme
19+
healthcheck:
20+
test: ['CMD-SHELL', 'pg_isready -U postgres']
21+
interval: 10s
22+
timeout: 5s
23+
retries: 5

.github/scripts/setup-keycloak.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
export KC_VERSION=26.2.5
3+
export KC_VERSION=26.7.2
44
curl -LO https://github.com/keycloak/keycloak/releases/download/"${KC_VERSION}"/keycloak-"${KC_VERSION}".zip
55

66
unzip -q keycloak-${KC_VERSION}.zip

.github/workflows/cdn-ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- uses: ./.github/actions/node
24+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
25+
with:
26+
cache: true
27+
install: false
2528

2629
- name: Install dependencies
2730
run: pnpm install --frozen-lockfile

.github/workflows/cli-binary-release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424

2525
- uses: oven-sh/setup-bun@v2
2626

27-
- uses: ./.github/actions/node
27+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
28+
with:
29+
cache: true
30+
install: false
2831

2932
- name: Install dependencies
3033
run: pnpm --filter ./cli --filter ./connect --filter ./shared --filter ./composition --filter ./protographic install --frozen-lockfile

.github/workflows/cli-ci.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727

28-
- uses: ./.github/actions/node
28+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
29+
with:
30+
cache: true
31+
install: false
2932
- uses: oven-sh/setup-bun@v2
3033

3134
- name: Install dependencies
@@ -71,14 +74,16 @@ jobs:
7174

7275
strategy:
7376
matrix:
74-
node-version: ["22.x", "24.x"]
77+
node-version: [22, 24]
7578

7679
steps:
7780
- uses: actions/checkout@v4
7881

79-
- uses: ./.github/actions/node
82+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
8083
with:
81-
node-version: ${{ matrix.node-version }}
84+
runtime: node@${{ matrix.node-version }}
85+
cache: true
86+
install: false
8287
- uses: oven-sh/setup-bun@v2
8388

8489
- name: Install dependencies

.github/workflows/composition-ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- uses: ./.github/actions/node
25+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
26+
with:
27+
cache: true
28+
install: false
2629

2730
- uses: ./.github/actions/go
2831

.github/workflows/controlplane-ci.yaml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
- "connect/**/*"
88
- "composition/**/*"
99
- "shared/**/*"
10-
- ".github/workflows/cp-ci.yaml"
10+
- ".github/workflows/controlplane-ci.yaml"
11+
- ".github/compose/controlplane-ci.yaml"
1112
- ".github/scripts/setup-keycloak.sh"
1213

1314
concurrency:
@@ -22,37 +23,30 @@ jobs:
2223
build_test:
2324
timeout-minutes: 20
2425
runs-on: ubuntu-latest
25-
services:
26-
redis:
27-
# Docker Hub image
28-
image: redis:7
29-
credentials:
30-
username: ${{secrets.DOCKER_USERNAME}}
31-
password: ${{secrets.DOCKER_PASSWORD}}
32-
ports:
33-
- 6379:6379
34-
postgres:
35-
# Docker Hub image
36-
image: postgres:15
37-
credentials:
38-
username: ${{secrets.DOCKER_USERNAME}}
39-
password: ${{secrets.DOCKER_PASSWORD}}
40-
ports:
41-
- 5432:5432
42-
env:
43-
POSTGRES_USER: postgres
44-
POSTGRES_PASSWORD: changeme
45-
# Set health checks to wait until postgres has started
46-
options: >-
47-
--health-cmd pg_isready
48-
--health-interval 10s
49-
--health-timeout 5s
50-
--health-retries 5
26+
permissions:
27+
contents: read
28+
env:
29+
DOCKER_CREDENTIALS_AVAILABLE: ${{ secrets.DOCKER_USERNAME != '' && secrets.DOCKER_PASSWORD != '' }}
5130

5231
steps:
5332
- uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
35+
36+
- name: Log in to Docker Hub
37+
if: env.DOCKER_CREDENTIALS_AVAILABLE == 'true'
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKER_USERNAME }}
41+
password: ${{ secrets.DOCKER_PASSWORD }}
5442

55-
- uses: ./.github/actions/node
43+
- name: Start service containers
44+
run: docker compose --project-name controlplane-ci --file .github/compose/controlplane-ci.yaml up --detach --wait --wait-timeout 60
45+
46+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
47+
with:
48+
cache: true
49+
install: false
5650

5751
- name: Install dependencies
5852
run: pnpm install --frozen-lockfile
@@ -106,6 +100,11 @@ jobs:
106100
retention-days: 14
107101
codecov-token: ${{ secrets.CODECOV_TOKEN }}
108102

103+
- name: Stop service containers
104+
if: always()
105+
continue-on-error: true
106+
run: docker compose --project-name controlplane-ci --file .github/compose/controlplane-ci.yaml down --volumes --remove-orphans
107+
109108
build_push_image:
110109
# This is a limitation of GitHub. Only organization members can push to GitHub Container Registry
111110
# For now, we will disable the push to the GitHub Container Registry for external contributors
@@ -124,4 +123,3 @@ jobs:
124123
token: ${{secrets.GITHUB_TOKEN}}
125124
image_name: controlplane
126125
image_description: "Cosmo Controlplane"
127-

0 commit comments

Comments
 (0)