From 610e1ed413db1a7694e44c41e317cf65d5ada263 Mon Sep 17 00:00:00 2001 From: punitkr03 Date: Sun, 7 Jan 2024 01:19:40 +0530 Subject: [PATCH 1/6] init --- src/api/chess/.gitignore | 175 ++++++++++++++++++++++++++++++++++++ src/api/chess/README.md | 15 ++++ src/api/chess/bun.lockb | Bin 0 -> 2030 bytes src/api/chess/index.ts | 1 + src/api/chess/package.json | 11 +++ src/api/chess/tsconfig.json | 22 +++++ 6 files changed, 224 insertions(+) create mode 100644 src/api/chess/.gitignore create mode 100644 src/api/chess/README.md create mode 100755 src/api/chess/bun.lockb create mode 100644 src/api/chess/index.ts create mode 100644 src/api/chess/package.json create mode 100644 src/api/chess/tsconfig.json diff --git a/src/api/chess/.gitignore b/src/api/chess/.gitignore new file mode 100644 index 0000000..468f82a --- /dev/null +++ b/src/api/chess/.gitignore @@ -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 diff --git a/src/api/chess/README.md b/src/api/chess/README.md new file mode 100644 index 0000000..b2f1948 --- /dev/null +++ b/src/api/chess/README.md @@ -0,0 +1,15 @@ +# chess-api + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v1.0.20. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. diff --git a/src/api/chess/bun.lockb b/src/api/chess/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..f1f123b8aed1aec42ed5bb98295679ae4c62afba GIT binary patch literal 2030 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_lQ6$=+&R z!c1oS*Ue|x*k^xiqr&#tv7MnIJPdXzJw1DT;@E+TfPe);F>s*K4N!gwOaYkB$-vMc z3}kTu=^!8t;sY_5f5iXe#krZe`%kfH?)5fk{8IfU{cMNOYo+DB~{vZE8QauealmK94fS8MHG>gwC`;5-@f4{7_sJe7}e!*(*Ft;UqQ3rO2JiSrr zw8czsEu((xifLubw=hZeDb6TscYJ83CDi$n^Y7$JebKLn?*i?FnG5n046s}+t7aB% z{nWfibaugYi7%HIIcN(i?+V&p>X9?)TB!NG{20lc`eu(_p7^fQp=Gnn9{oLjqu=pB zRb8O}f>@Q6ps<3OiyUq&OH1dhUE_1_0Q%+(@YHT%hCnTb z77Pp=Y#@I!FnB;|)Q~Jr%`HnU(sQjSNiE7t%n2?j%FIi*Q!qq0&I0bZlHz2rNe6z5 zEG?QcK?GDGfW-LkEw*_lTez#FxHz>4Xj<%Lg~p&X?;q2Es(FCrRf~n`8O92}e-%&{ zgh6WnVAuo0!4Ow4FeGQB78mO#7G#!G7Niy@7iAWdIDnb@!0IQXq@ Date: Sun, 7 Jan 2024 01:39:01 +0530 Subject: [PATCH 2/6] Delete .github/workflows/lint-go-ci.yml --- .github/workflows/lint-go-ci.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/lint-go-ci.yml diff --git a/.github/workflows/lint-go-ci.yml b/.github/workflows/lint-go-ci.yml deleted file mode 100644 index 80cedf8..0000000 --- a/.github/workflows/lint-go-ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Go Linter CI - -on: - push: - branches: - - api/basketball - - main -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.21.4 - - - name: Install golint - run: | - cd src/api/basketball - go mod tidy - go get -u golang.org/x/lint/golint - - - name: Run golint - run: golint From f6c303a9b5c9b54485cc6b2bdbd21776dff6c659 Mon Sep 17 00:00:00 2001 From: zakhaev26 Date: Sun, 7 Jan 2024 02:13:23 +0530 Subject: [PATCH 3/6] feat(ci): adds `chess` ci configurations --- .github/workflows/check_chess_build.yml | 33 +++++++++++++++++++++++++ src/api/chess/index.ts | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/check_chess_build.yml diff --git a/.github/workflows/check_chess_build.yml b/.github/workflows/check_chess_build.yml new file mode 100644 index 0000000..f80ef81 --- /dev/null +++ b/.github/workflows/check_chess_build.yml @@ -0,0 +1,33 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + + - name: Install Bun Runtime + uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.0.20 + + - name: Install deps + run: | + cd src/api/chess + bun install + + - name: Build API + run: bun index.ts + + diff --git a/src/api/chess/index.ts b/src/api/chess/index.ts index f67b2c6..d12aa38 100644 --- a/src/api/chess/index.ts +++ b/src/api/chess/index.ts @@ -1 +1,2 @@ -console.log("Hello via Bun!"); \ No newline at end of file +console.log("Hello via Bun!"); + From 640f9a9f8b4f326b08c3024c95d9c517a5d6f1b4 Mon Sep 17 00:00:00 2001 From: zakhaev26 Date: Sun, 7 Jan 2024 02:15:13 +0530 Subject: [PATCH 4/6] fixes bun build --- .github/workflows/check_chess_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_chess_build.yml b/.github/workflows/check_chess_build.yml index f80ef81..70d3673 100644 --- a/.github/workflows/check_chess_build.yml +++ b/.github/workflows/check_chess_build.yml @@ -28,6 +28,6 @@ jobs: bun install - name: Build API - run: bun index.ts + run: bun run index.ts From 91657b033c9a2287eee930e929d53209c78ed7d1 Mon Sep 17 00:00:00 2001 From: zakhaev26 Date: Sun, 7 Jan 2024 02:16:32 +0530 Subject: [PATCH 5/6] fixes CI names --- .github/workflows/check_chess_build.yml | 2 +- .github/workflows/check_go_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_chess_build.yml b/.github/workflows/check_chess_build.yml index 70d3673..23a7e57 100644 --- a/.github/workflows/check_chess_build.yml +++ b/.github/workflows/check_chess_build.yml @@ -1,4 +1,4 @@ -name: Build +name: BUILD_CHESS_API[RUNTIME:BUN] on: push: diff --git a/.github/workflows/check_go_build.yml b/.github/workflows/check_go_build.yml index 892ed7b..cfaac61 100644 --- a/.github/workflows/check_go_build.yml +++ b/.github/workflows/check_go_build.yml @@ -1,4 +1,4 @@ -name: Build +name: BUILD_BASKETBALL_API on: push: From 2768bd3b5ab2fda9a5a4eb1d77be1306836084a0 Mon Sep 17 00:00:00 2001 From: zakhaev26 Date: Sun, 7 Jan 2024 02:20:46 +0530 Subject: [PATCH 6/6] bug(ci): fixes script error in chess api --- .github/workflows/check_chess_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_chess_build.yml b/.github/workflows/check_chess_build.yml index 23a7e57..4e4fd56 100644 --- a/.github/workflows/check_chess_build.yml +++ b/.github/workflows/check_chess_build.yml @@ -25,9 +25,10 @@ jobs: - name: Install deps run: | cd src/api/chess + echo pwd bun install - name: Build API - run: bun run index.ts + run: bun run src/api/chess/index.ts