Skip to content
Closed
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
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: 'en-US'
early_access: false
reviews:
auto_review:
enabled: true
base_branches: ['dev', 'main']
sequence_diagrams: false
chat:
auto_reply: true
11 changes: 0 additions & 11 deletions .devcontainer/.env

This file was deleted.

37 changes: 18 additions & 19 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "zenstack",
"dockerComposeFile": [
"./docker-compose.yml"
],
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"workspaceFolder": "/workspace",
"service": "workspace",
"shutdownAction": "stopCompose",
"postCreateCommand": "npm i -g pnpm@9.15.9 && pnpm install && pnpm build && pnpm test-scaffold",
"remoteUser": "node",
"customizations": {
"vscode": {
"extensions": [
"langium.langium-vscode",
"firsttris.vscode-jest-runner"
]
}
}
}
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
"features": {
"ghcr.io/devcontainers/features/git-lfs:1": {
"autoPull": true,
"version": "latest"
},
"ghcr.io/itsmechlark/features/postgresql:1": {
"version": "latest"
}
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install"
}
37 changes: 0 additions & 37 deletions .devcontainer/docker-compose.yml

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**

- ZenStack version: [e.g., 2.0.0]
- Prisma version: [e.g., 5.7.0]
- ZenStack version: [e.g., 3.1.0]
- Database type: [e.g. Postgresql]
- Node.js/Bun version: [e.g., 20.0.0]
- Package manager: [e.g., npm, yarn, pnpm]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly

target-branch: dev

14 changes: 0 additions & 14 deletions .github/release/.release-manifest.json

This file was deleted.

63 changes: 0 additions & 63 deletions .github/release/release-main-config.json

This file was deleted.

69 changes: 36 additions & 33 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: CI

env:
TELEMETRY_TRACKING_TOKEN: ${{ secrets.TELEMETRY_TRACKING_TOKEN }}
DO_NOT_TRACK: '1'
name: Build and Test

on:
pull_request:
branches:
- main
- dev
- release/*

env:
TELEMETRY_TRACKING_TOKEN: ${{ secrets.TELEMETRY_TRACKING_TOKEN }}
DO_NOT_TRACK: '1'

permissions:
contents: read
Expand All @@ -25,7 +21,7 @@ jobs:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: abc123
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
Expand All @@ -35,25 +31,44 @@ jobs:
ports:
- 5432:5432

mysql:
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: mysql
ports:
- 3306:3306
# Set health checks to wait until mysql has started
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
provider: [sqlite, postgresql, mysql]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9.15.9
version: 10.12.1

- name: Use Node.js ${{ matrix.node-version }}
uses: buildjet/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Use Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
Expand All @@ -71,29 +86,17 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.1.0

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
with:
gradle-home-cache-cleanup: true

- name: Build
run: DEFAULT_NPM_TAG=latest pnpm run build-ci
run: |
pnpm run build
pnpm tsx packages/cli/scripts/post-build.ts

- name: Lint
run: pnpm lint
run: pnpm run lint

# install again for internal dependencies
- name: Install internal dependencies
run: pnpm install --frozen-lockfile
- name: Set MySQL max_connections
run: |
mysql -h 127.0.0.1 -uroot -pmysql -e "SET GLOBAL max_connections=500;"

- name: Test
run: pnpm run test-scaffold && pnpm run test-ci
run: TEST_DB_PROVIDER=${{ matrix.provider }} pnpm run test
Loading
Loading