forked from platformatic/platformatic
-
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.
Signed-off-by: Matteo Collina <[email protected]> Co-authored-by: Luca Maraschi <[email protected]> Co-authored-by: Leonardo Rossi <[email protected]> Co-authored-by: Marco Piraccini <[email protected]> Co-authored-by: Ivan Tymoshenko <[email protected]> Co-authored-by: Simon Plenderleith <[email protected]>
- Loading branch information
Showing
406 changed files
with
53,598 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,112 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env* | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
packages/db/fixtures/sqlite/db | ||
packages/db/test/fixtures/sqlite/db | ||
|
||
# packages/dashboard specific rules | ||
packages/db-dashboard/build/ | ||
playwright-report | ||
.DS_Store | ||
.swp |
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,227 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
|
||
jobs: | ||
setup-node_modules: | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- name: pnpm fetch | ||
run: pnpm fetch | ||
|
||
ci-cli: | ||
needs: setup-node_modules | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: pnpm install | ||
run: pnpm install | ||
- name: Run test suite | ||
run: cd packages/cli && pnpm test | ||
|
||
ci-db-dashboard: | ||
needs: setup-node_modules | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: pnpm install | ||
run: pnpm install | ||
- name: Builds the dashboard | ||
run: npm run dashboard:build | ||
- name: Run test suite Dashboard | ||
run: cd packages/db-dashboard && pnpm test | ||
|
||
ci-config: | ||
needs: setup-node_modules | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: pnpm install | ||
run: pnpm install --offline | ||
- name: Run test suite config manager | ||
run: cd packages/config && pnpm test | ||
|
||
ci-db: | ||
needs: setup-node_modules | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: ikalnytskyi/action-setup-postgres@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: pnpm install | ||
run: pnpm install --offline | ||
- name: Builds the dashboard | ||
run: pnpm run dashboard:build | ||
- name: Run test suite core | ||
run: cd packages/db-core && pnpm test | ||
- name: Run test suite Platformatic DB | ||
run: cd packages/db && pnpm test | ||
|
||
ci-db-authorization: | ||
needs: setup-node_modules | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Start docker containers for testing | ||
run: docker-compose up -d postgresql | ||
- name: pnpm install | ||
run: pnpm install --offline | ||
- name: Run test suite | ||
run: cd packages/db-authorization && pnpm test | ||
|
||
ci-db-core: | ||
needs: setup-node_modules | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
db: [postgresql, mariadb, mysql, mysql8, sqlite] | ||
node-version: [16, 18] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Start docker containers for testing | ||
run: docker-compose up -d ${{ matrix.db }} | ||
if: ${{ matrix.db != 'sqlite' }} | ||
- name: pnpm install | ||
run: pnpm install --offline | ||
- name: Wait for DB | ||
run: sleep 10 | ||
if: ${{ matrix.db != 'sqlite' }} | ||
- name: Run test suite sql-mapper | ||
run: cd packages/sql-mapper && pnpm run test:typescript && pnpm run test:${{ matrix.db }}; cd ../.. | ||
- name: Run test suite sql-json-schema-mapper | ||
run: cd packages/sql-json-schema-mapper && pnpm run test:${{ matrix.db }}; cd ../.. | ||
- name: Run test suite sql-openapi | ||
run: cd packages/sql-openapi && pnpm run test:typescript && pnpm run test:${{ matrix.db }}; cd ../.. | ||
- name: Run test suite sql-graphql | ||
run: cd packages/sql-graphql && pnpm run test:typescript && pnpm run test:${{ matrix.db }}; cd .. | ||
|
||
ci-auth-login: | ||
needs: setup-node_modules | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
os: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: pnpm install | ||
run: pnpm install --offline | ||
- name: Run test suite | ||
run: cd packages/authenticate && pnpm test; cd ../.. | ||
|
||
playwright-e2e: | ||
needs: setup-node_modules | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Start docker containers for testing | ||
run: docker-compose up -d postgresql | ||
- name: pnpm install | ||
run: pnpm install --offline --frozen-lockfile | ||
- name: Builds the dashboard | ||
run: pnpm run dashboard:build | ||
- name: Install Playwright browsers | ||
run: cd packages/db-dashboard && pnpm exec playwright install | ||
- name: Wait for DB | ||
run: sleep 10 | ||
- name: Run Platformatic DB server and E2E tests | ||
run: | | ||
node ./packages/cli/cli.js db --config=./packages/db-dashboard/test/e2e/fixtures/e2e-test-config.json & | ||
sleep 5 && | ||
cd packages/db-dashboard && pnpm run test:e2e |
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,29 @@ | ||
name: docker build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
environment: main | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: platformatic/platformatic-private:latest | ||
platforms: linux/amd64,linux/arm64 |
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,25 @@ | ||
name: Add new issue/PR to project | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue or PR to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: vidavidorra/[email protected] | ||
with: | ||
appId: ${{ secrets.INTERNAL_GH_APP_ID }} | ||
privateKey: ${{ secrets.INTERNAL_GH_APP_SECRET }} | ||
- name: Add to Project | ||
env: | ||
TOKEN: ${{ steps.generate_token.outputs.token }} | ||
uses: actions/add-to-project@338ac1805ece459f9c25a3e7a2b749fec994576d | ||
with: | ||
project-url: https://github.com/orgs/platformatic/projects/1 | ||
github-token: ${{ env.TOKEN }} |
Oops, something went wrong.