Skip to content

Commit

Permalink
Merge pull request #1 from rjoydip/implement-cicd
Browse files Browse the repository at this point in the history
Implement CI/CD and run test and install for all submodule
  • Loading branch information
rjoydip authored Aug 30, 2024
2 parents f1d8cbf + 0f6b280 commit fbb71ae
Show file tree
Hide file tree
Showing 102 changed files with 596 additions and 80 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Ci

on:
push:
branches: main
pull_request:
branches: main

jobs:
verify:
name: ☑️ Verify
runs-on: ubuntu-latest

permissions:
id-token: write
contents: read

steps:
- name: ⬇️ Clone repository
uses: actions/checkout@v3

- name: 🟢 Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: 🟢 Install Bun
uses: oven-sh/setup-bun@v2

- name: 🟢 Install Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: ⌛ Run Install
run: "deno run --allow-read --allow-env --allow-run scripts/_runInstall.ts"
- name: 🧪 Run Test
run: "deno run --allow-read --allow-env --allow-run scripts/_runTest.ts"
175 changes: 175 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore

# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Caches

.cache

# 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/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# 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 variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

# 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

# vuepress v2.x temp and cache directory

.temp

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# IntelliJ based IDEs
.idea

# Finder (MacOS) folder config
.DS_Store
File renamed without changes.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "1276209554279108745",
"scripts": {
"dev": "bun run --hot src/index.ts"
"dev": "bun run --hot src/index.ts",
"test": "bun test"
},
"dependencies": {
"@hono/node-server": "^1.12.1",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ import { z } from 'zod';
const http = new Hono<{ Bindings: HttpBindings }>();

http.post('/example', zValidator('query', z.object({ name: z.string() })), async (c) => {
// await new Promise<void>((resolve) => setTimeout(() => resolve(), 1)); // Removing this line prints "Hello" to the console.
await new Promise<void>((resolve) => setTimeout(() => resolve(), 1)); // Removing this line prints "Hello" to the console.

c.env.incoming.pipe(process.stdout);
if (c.env && c.env.incoming) c.env.incoming.pipe(process.stdout);

return c.json({ message: 'Hello, World!' }, 200);
return c.json({ message: `Hello, ${c.req.query('name')}!` }, 200);
});

serve({
fetch: http.fetch,
hostname: 'localhost',
port: 1337,
});
export { http }
14 changes: 14 additions & 0 deletions hono/discord/runtime-bun/1276209554279108745/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { describe, expect, it } from "bun:test";
import { http } from "./http";

describe("@issue/3242", () => {
it("Should return 200 Response", async () => {
const name = 'hono'
const req = new Request(`http://localhost/example?name=${name}`);
const res = await http.request(req, {
method: 'POST'
});
expect(await res.text()).toBe(JSON.stringify({ message: `Hello, ${name}!` }));
expect(res.status).toBe(200);
});
});
8 changes: 8 additions & 0 deletions hono/discord/runtime-bun/1276209554279108745/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { serve } from "@hono/node-server";
import { http } from "./http";

serve({
fetch: http.fetch,
hostname: "127.0.0.1",
port: 1337,
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 0 additions & 48 deletions hono/github/3275/client/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions hono/github/3275/server/package.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"imports": {
"@std/assert": "jsr:@std/assert@^1.0.2",
"hono": "jsr:@hono/hono@^4.5.4"
},
"tasks": {
"test": "deno test --allow-read --quiet"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions hono/github/runtime-node/3275/client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@hono/github/issue-3275/client",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check .",
"format": "prettier --write .",
"test": "echo \"No test specified\""
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.6.4",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"sveltekit-superforms": "^2.16.1",
"tailwindcss": "^3.4.4",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"zod": "^3.23.8"
},
"type": "module",
"dependencies": {
"@internationalized/date": "^3.5.4",
"bits-ui": "^0.21.12",
"chart.js": "^4.4.3",
"chartjs-plugin-datalabels": "^2.2.0",
"clsx": "^2.1.1",
"lucide-svelte": "^0.408.0",
"luxon": "^3.4.4",
"mode-watcher": "^0.4.1",
"svelte-chartjs": "^3.1.5",
"svelte-sonner": "^0.3.27",
"tailwind-merge": "^2.4.0",
"tailwind-variants": "^0.2.1",
"hono": "^4.5.5"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit fbb71ae

Please sign in to comment.