forked from wundergraph/cosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
673 changed files
with
124,266 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
**/node_modules | ||
docker-compose.* | ||
npm-debug.log | ||
coverage | ||
dist | ||
**/.env | ||
**/.env.local | ||
/.github | ||
/.vscode | ||
/build | ||
/.idea | ||
/.husky | ||
docs | ||
demo | ||
cli | ||
**/dist | ||
**/gen | ||
/iac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- | ||
Thank you for your pull request. Please provide a description above and review | ||
the requirements below. | ||
Contributors guide: https://github.com/wundergraph/cloud/blob/main/CONTRIBUTING.md | ||
Squashed commit must follow https://www.conventionalcommits.org/en/v1.0.0/ so we can generate the changelog. | ||
--> | ||
|
||
## Motivation and Context | ||
|
||
<!-- | ||
Why is this change required? What problem does it solve? Which issues are linked? | ||
Please try to describe in detail the impact of this change. Add screenshots if it helps. | ||
--> | ||
|
||
- [ ] Tests or benchmark included | ||
- [ ] Documentation is changed or added on [https://app.gitbook.com/](https://app.gitbook.com/) | ||
- [ ] PR title must follow [conventional-commit-standard](https://github.com/wundergraph/wundergraph/blob/main/CONTRIBUTING.md#conventional-commit-standard) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Setup Go" | ||
description: "This action install go and cache modules and build dependencies" | ||
inputs: | ||
go-version: | ||
description: "The go version to install" | ||
default: "1.20" | ||
required: false | ||
working-directory: | ||
description: "The working directory" | ||
required: false | ||
gh-engine-repo-token: | ||
description: "Temporary token for private engine" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
cache-dependency-path: ${{ inputs.cache-dependency-path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Setup Node" | ||
description: "This action install node and cache modules. It uses pnpm as package manager." | ||
inputs: | ||
node-version: | ||
description: "The node version to install (Default: lts)" | ||
default: "lts/*" | ||
required: false | ||
working-directory: | ||
description: "The working directory of your node package" | ||
default: "." | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- uses: pnpm/action-setup@v2.2.4 | ||
id: pnpm-install | ||
with: | ||
version: 8.6.10 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-8-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-8-store- | ||
- name: setup pnpm config registry | ||
run: pnpm config set registry https://registry.npmjs.org | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
studio: | ||
- "studio/**/*" | ||
monorepo: | ||
- "pnpm-lock.yaml" | ||
- "pnpm-workspace.yaml" | ||
- "package.json" | ||
- "Makefile" | ||
cli: | ||
- "cli/**/*" | ||
router: | ||
- "router/**/*" | ||
connect: | ||
- "connect/**/*" | ||
protocol: | ||
- "proto/**/*" | ||
controlplane: | ||
- "controlplane/**/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Cli CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- "**" | ||
paths: | ||
- "cli/**/*" | ||
- "connect/**/*" | ||
- ".github/workflows/cli-ci.yaml" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "cli/**/*" | ||
- "connect/**/*" | ||
- ".github/workflows/cli-ci.yaml" | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.head_ref}} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
build_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/node | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Generate code | ||
run: pnpm buf generate --template buf.ts.gen.yaml | ||
|
||
- name: Build | ||
run: pnpm run --filter ./cli --filter ./connect --filter ./shared --filter ./composition build | ||
|
||
- name: Test | ||
run: pnpm run --filter wgc test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Composition CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- "**" | ||
paths: | ||
- "composition/**/*" | ||
- ".github/workflows/composition-ci.yaml" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- "composition/**/*" | ||
- ".github/workflows/composition-ci.yaml" | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.head_ref}} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
build_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/node | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Generate code | ||
run: pnpm buf generate --template buf.ts.gen.yaml | ||
|
||
- name: Build | ||
run: pnpm run --filter ./composition --filter ./connect --filter ./shared build | ||
|
||
- name: Test | ||
run: pnpm run --filter composition test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Controlplane CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- "**" | ||
paths: | ||
- "controlplane/**/*" | ||
- "connect/**/*" | ||
- "composition/**/*" | ||
- ".github/workflows/cp-ci.yaml" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "controlplane/**/*" | ||
- "connect/**/*" | ||
- "composition/**/*" | ||
- ".github/workflows/cp-ci.yaml" | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.head_ref}} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
build_test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
# Docker Hub image | ||
image: postgres:14 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: changeme | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/node | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Generate code | ||
run: pnpm buf generate --template buf.ts.gen.yaml | ||
|
||
- name: Build | ||
run: pnpm run --filter ./controlplane --filter ./connect --filter ./shared --filter ./composition build | ||
|
||
- name: Test | ||
run: pnpm run --filter controlplane test | ||
env: | ||
DB_URL: "postgresql://postgres:changeme@localhost:5432/controlplane" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
name: Build and publish Docker images on tags | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image-tags: | ||
strategy: | ||
matrix: | ||
include: | ||
- container_name: controlplane | ||
dockerfile: controlplane/Dockerfile | ||
context_path: . | ||
- container_name: router | ||
dockerfile: router/Dockerfile | ||
context_path: . | ||
- container_name: studio | ||
dockerfile: studio/Dockerfile | ||
context_path: . | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.container_name }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=sha,format=long,prefix=sha256- | ||
- name: Install Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
file: ${{ matrix.dockerfile }} | ||
context: ${{ matrix.context_path }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
Oops, something went wrong.