From f39599ac4a1728ab7a842993146c18d1cfa9faff Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Sun, 19 Jan 2025 23:50:10 +0530 Subject: [PATCH 01/31] added codecov code for showing statistics --- .github/workflows/pull-request.yml | 152 ++++++++++++++++------------- 1 file changed, 84 insertions(+), 68 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index db351a423fe..1a486c876a2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -27,8 +27,8 @@ jobs: run: | echo "Pull requests are only allowed against the 'develop-postgres' branch. Please refer to the pull request guidelines." echo "Error: Close this PR and try again." - exit 1 - + exit 1 + Code-Quality-Checks: name: Checking code quality runs-on: ubuntu-latest @@ -86,7 +86,7 @@ jobs: - name: Run Python script run: | - python .github/workflows/scripts/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }} + python .github/workflows/scripts/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }} check_gql_tada: name: Check gql tada files and configuration @@ -98,7 +98,7 @@ jobs: run: docker buildx build --file ./docker/api.Containerfile --tag talawa_api --target non_production ./ - name: Check gql tada run: docker container run talawa_api pnpm check_gql_tada - + check_drizzle_migrations: name: Check drizzle migration files runs-on: ubuntu-latest @@ -109,7 +109,7 @@ jobs: run: docker buildx build --file ./docker/api.Containerfile --tag talawa_api --target non_production ./ - name: Check drizzle migrations run: docker container run --env-file ./envFiles/.env.ci talawa_api pnpm check_drizzle_migrations - + check_type_errors: name: Check type errors runs-on: ubuntu-latest @@ -127,71 +127,73 @@ jobs: needs: [Code-Quality-Checks] runs-on: ubuntu-latest steps: - - name: Checkout this repository - uses: actions/checkout@v4.2.2 - - id: changed_files - name: Get changed files - uses: tj-actions/changed-files@v45.0.4 - with: - files: | - .coderabbit.yaml - Caddyfile - codegen.ts - Dockerfile* - docker-compose* - .dockerignore - .env.sample - .env_test - eslint.config.mjs - envFiles/** - .gitignore - init-mongo.sh - .prettierignore - .prettierrc.json - .pylintrc - .github/** - biome.jsonc - drizzle_migrations/** - renovate.json - requirements.txt - schema.graphql - CODEOWNERS - LICENSE - tsconfig.json - vitest.config.ts - pnpm-lock.yaml - package.json - package-lock.json - .nojekyll - docs/docusaurus.config.ts - docs/sidebar* - setup.ts - tsconfig.build.json - vite.config.mts - CNAME - CODE_OF_CONDUCT.md - CODE_STYLE.md - CONTRIBUTING.md - DOCUMENTATION.md - INSTALLATION.md - ISSUE_GUIDELINES.md - PR_GUIDELINES.md - README.md - - env: - CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} - if: steps.changed_files.outputs.any_changed == 'true' || steps.changed_files.outputs.any_deleted == 'true' - name: Show changed files - run: | - echo "Unauthorized changes were made in the following files:" - for FILE in ${CHANGED_FILES}; do - echo "$FILE" - done - echo "To override this, apply the 'ignore-sensitive-files-pr' label" - exit 1 - + - name: Checkout this repository + uses: actions/checkout@v4.2.2 + - id: changed_files + name: Get changed files + uses: tj-actions/changed-files@v45.0.4 + with: + files: | + .coderabbit.yaml + Caddyfile + codegen.ts + Dockerfile* + docker-compose* + .dockerignore + .env.sample + .env_test + eslint.config.mjs + envFiles/** + .gitignore + init-mongo.sh + .prettierignore + .prettierrc.json + .pylintrc + .github/** + biome.jsonc + drizzle_migrations/** + renovate.json + requirements.txt + schema.graphql + CODEOWNERS + LICENSE + tsconfig.json + vitest.config.ts + pnpm-lock.yaml + package.json + package-lock.json + .nojekyll + docs/docusaurus.config.ts + docs/sidebar* + setup.ts + tsconfig.build.json + vite.config.mts + CNAME + CODE_OF_CONDUCT.md + CODE_STYLE.md + CONTRIBUTING.md + DOCUMENTATION.md + INSTALLATION.md + ISSUE_GUIDELINES.md + PR_GUIDELINES.md + README.md + - env: + CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + if: steps.changed_files.outputs.any_changed == 'true' || steps.changed_files.outputs.any_deleted == 'true' + name: Show changed files + run: | + echo "Unauthorized changes were made in the following files:" + for FILE in ${CHANGED_FILES}; do + echo "$FILE" + done + echo "To override this, apply the 'ignore-sensitive-files-pr' label" + exit 1 + Run-Tests: name: Run tests for talawa api runs-on: ubuntu-latest + needs: + [Code-Quality-Checks, Check-ESlint-Disable, Check-Code-Coverage-Disable] steps: - name: Checkout this repository uses: actions/checkout@v4.2.2 @@ -201,12 +203,25 @@ jobs: run: docker compose build - name: Run tests run: docker compose up --exit-code-from api + - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} + uses: codecov/codecov-action@v4 + with: + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + name: "${{env.CODECOV_UNIQUE_NAME}}" + + - name: Test acceptable level of code coverage + uses: VeryGoodOpenSource/very_good_coverage@v2 + with: + path: "./coverage/lcov.info" + min_coverage: 95.0 Test-Docusaurus-Deployment: name: Test Deployment to https://docs-api.talawa.io runs-on: ubuntu-latest needs: [Run-Tests] - # Run only if the develop-postgres branch and not dependabot + # Run only if the develop-postgres branch and not dependabot if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }} steps: - uses: actions/checkout@v4 @@ -290,3 +305,4 @@ jobs: run: | source venv/bin/activate python .github/workflows/scripts/check_docstrings.py --directories .github + From d5da3e9d6ee3f53bb54cee9e6627ebfe99764792 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 00:05:14 +0530 Subject: [PATCH 02/31] changed yml to yaml --- .github/workflows/{codeql-codescan.yml => codeql-codescan.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{codeql-codescan.yml => codeql-codescan.yaml} (100%) diff --git a/.github/workflows/codeql-codescan.yml b/.github/workflows/codeql-codescan.yaml similarity index 100% rename from .github/workflows/codeql-codescan.yml rename to .github/workflows/codeql-codescan.yaml From 781da574d062b9c5dacfd8723e7a486474ed7f06 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 00:07:22 +0530 Subject: [PATCH 03/31] changed yml to yaml --- .../workflows/{codeql-codescan.yaml => codeql-codescan.yml} | 0 .github/workflows/pull-request.yml | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) rename .github/workflows/{codeql-codescan.yaml => codeql-codescan.yml} (100%) diff --git a/.github/workflows/codeql-codescan.yaml b/.github/workflows/codeql-codescan.yml similarity index 100% rename from .github/workflows/codeql-codescan.yaml rename to .github/workflows/codeql-codescan.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1a486c876a2..de3636d3716 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -192,8 +192,7 @@ jobs: Run-Tests: name: Run tests for talawa api runs-on: ubuntu-latest - needs: - [Code-Quality-Checks, Check-ESlint-Disable, Check-Code-Coverage-Disable] + needs: [Code-Quality-Checks, check_code_coverage_disable] steps: - name: Checkout this repository uses: actions/checkout@v4.2.2 From 20c10060ee5200386adc918c3ddd5966534f1dcf Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 00:09:56 +0530 Subject: [PATCH 04/31] changed yaml back to yml --- .github/workflows/pull-request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index de3636d3716..4d5032c02a0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -193,6 +193,8 @@ jobs: name: Run tests for talawa api runs-on: ubuntu-latest needs: [Code-Quality-Checks, check_code_coverage_disable] + env: + CODECOV_UNIQUE_NAME: ${{github.workflow}}-${{github.ref_name}} steps: - name: Checkout this repository uses: actions/checkout@v4.2.2 From 6f48459a8fbeb73269386f5835b23d3f78bf3082 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 12:33:57 +0530 Subject: [PATCH 05/31] added some code in vitest.config.ts --- vitest.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index 15a59e249c2..d242334dc9a 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,11 +1,14 @@ -// More information at this link: https://vitest.dev/config/ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ plugins: [tsconfigPaths()], test: { - // // https://vitest.dev/config/#fileparallelism + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov"], // Specify 'lcov' to generate lcov.info + }, + // https://vitest.dev/config/#fileparallelism // fileParallelism: true, // https://vitest.dev/config/#globalsetup From fca96091f9f869ad8aca6fbd8c0c2f96c9358505 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 12:54:13 +0530 Subject: [PATCH 06/31] added some code in vitest.config.ts --- package.json | 191 ++++++++++++++++++++++++----------------------- vitest.config.ts | 31 ++++---- 2 files changed, 112 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 7cd7f3d786c..730e040cbf8 100644 --- a/package.json +++ b/package.json @@ -1,97 +1,98 @@ { - "author": "Palisadoes Foundation", - "bugs": { - "url": "https://github.com/PalisadoesFoundation/talawa-api/issues" - }, - "dependencies": { - "@fastify/cors": "^10.0.2", - "@fastify/helmet": "^13.0.1", - "@fastify/jwt": "^9.0.3", - "@fastify/rate-limit": "^10.2.2", - "@fastify/type-provider-typebox": "^5.1.0", - "@node-rs/argon2": "^2.0.2", - "@pothos/core": "^4.3.0", - "@pothos/plugin-relay": "^4.3.0", - "@sinclair/typebox": "^0.34.14", - "ajv-formats": "^3.0.1", - "close-with-grace": "^2.2.0", - "drizzle-orm": "^0.38.4", - "drizzle-zod": "0.6.1", - "env-schema": "^6.0.1", - "fastify": "^5.2.1", - "fastify-plugin": "^5.0.1", - "graphql": "^16.10.0", - "graphql-scalars": "^1.24.0", - "graphql-upload-minimal": "^1.6.1", - "mercurius": "^16.0.1", - "mercurius-upload": "^8.0.0", - "minio": "^8.0.3", - "postgres": "^3.4.5", - "ulidx": "^2.4.1", - "uuidv7": "^1.0.2", - "zod": "^3.24.1" - }, - "description": "talawa-api is a backend repository written using Node.js and graphql for generating APIs for the talawa flutter app.", - "devDependencies": { - "@biomejs/biome": "^1.9.4", - "@faker-js/faker": "^9.4.0", - "@swc/cli": "0.6.0", - "@swc/core": "^1.10.7", - "@types/node": "^22.10.7", - "@vitest/coverage-v8": "^3.0.1", - "drizzle-kit": "^0.30.2", - "drizzle-seed": "^0.3.0", - "gql.tada": "^1.8.10", - "lefthook": "^1.10.8", - "mercurius-integration-testing": "^9.0.1", - "pino-pretty": "^13.0.0", - "tsx": "^4.19.2", - "typescript": "^5.7.3", - "vite-tsconfig-paths": "^5.1.4", - "vitest": "^3.0.1" - }, - "engines": { - "node": "22.13.0" - }, - "homepage": "https://github.com/PalisadoesFoundation/talawa-api#readme", - "keywords": [ - "chats", - "community", - "events", - "organization" - ], - "license": "GNU General Public License v3.0", - "main": "./dist/index.js", - "name": "talawa-api", - "packageManager": "pnpm@9.15.4", - "repository": { - "type": "git", - "url": "https://github.com/PalisadoesFoundation/talawa-api" - }, - "scripts": { - "apply_drizzle_migrations": "drizzle-kit migrate", - "apply_drizzle_test_migrations": "drizzle-kit migrate --config=./test/drizzle.config.ts", - "build_production": "swc ./src/ --ignore \"**/*.spec.ts,**/*.test.ts\" --out-dir ./dist/ --strip-leading-paths", - "check_code_quality": "biome check --error-on-warnings", - "check_drizzle_migrations": "drizzle-kit check", - "check_gql_tada": "gql.tada doctor && gql.tada check --fail-on-warn", - "check_type_errors": "tsc", - "disable_git_hooks": "lefthook uninstall", - "drop_drizzle_migrations": "drizzle-kit drop", - "enable_git_hooks": "lefthook install", - "fix_code_quality": "biome check --error-on-warnings --write", - "generate_drizzle_migrations": "drizzle-kit generate", - "generate_graphql_sdl_file": "tsx ./scripts/generateGraphQLSDLFile.ts", - "generate_gql_tada": "gql.tada generate-output && gql.tada turbo --fail-on-warn", - "push_drizzle_schema": "drizzle-kit push", - "push_drizzle_test_schema": "drizzle-kit push --config=./test/drizzle.config.ts", - "run_tests": "vitest", - "start_development_server": "tsx watch ./src/index.ts", - "start_development_server_with_debugger": "tsx watch --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./src/index.ts", - "start_production_server": "pnpm build_production && node ./dist/index.js", - "start_production_server_with_debugger": "pnpm build_production && node --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./dist/index.js", - "upgrade_drizzle_metadata": "drizzle-kit up" - }, - "type": "module", - "version": "1.0.0" + "author": "Palisadoes Foundation", + "bugs": { + "url": "https://github.com/PalisadoesFoundation/talawa-api/issues" + }, + "dependencies": { + "@fastify/cors": "^10.0.2", + "@fastify/helmet": "^13.0.1", + "@fastify/jwt": "^9.0.3", + "@fastify/rate-limit": "^10.2.2", + "@fastify/type-provider-typebox": "^5.1.0", + "@node-rs/argon2": "^2.0.2", + "@pothos/core": "^4.3.0", + "@pothos/plugin-relay": "^4.3.0", + "@sinclair/typebox": "^0.34.14", + "ajv-formats": "^3.0.1", + "close-with-grace": "^2.2.0", + "drizzle-orm": "^0.38.4", + "drizzle-zod": "0.6.1", + "env-schema": "^6.0.1", + "fastify": "^5.2.1", + "fastify-plugin": "^5.0.1", + "graphql": "^16.10.0", + "graphql-scalars": "^1.24.0", + "graphql-upload-minimal": "^1.6.1", + "mercurius": "^16.0.1", + "mercurius-upload": "^8.0.0", + "minio": "^8.0.3", + "postgres": "^3.4.5", + "ulidx": "^2.4.1", + "uuidv7": "^1.0.2", + "zod": "^3.24.1" + }, + "description": "talawa-api is a backend repository written using Node.js and graphql for generating APIs for the talawa flutter app.", + "devDependencies": { + "@biomejs/biome": "^1.9.4", + "@faker-js/faker": "^9.4.0", + "@swc/cli": "0.6.0", + "@swc/core": "^1.10.7", + "@types/node": "^22.10.7", + "@vitest/coverage-v8": "^3.0.1", + "drizzle-kit": "^0.30.2", + "drizzle-seed": "^0.3.0", + "gql.tada": "^1.8.10", + "lefthook": "^1.10.8", + "mercurius-integration-testing": "^9.0.1", + "pino-pretty": "^13.0.0", + "tsx": "^4.19.2", + "typescript": "^5.7.3", + "vite-tsconfig-paths": "^5.1.4", + "vitest": "^3.0.1" + }, + "engines": { + "node": "22.13.0" + }, + "homepage": "https://github.com/PalisadoesFoundation/talawa-api#readme", + "keywords": [ + "chats", + "community", + "events", + "organization" + ], + "license": "GNU General Public License v3.0", + "main": "./dist/index.js", + "name": "talawa-api", + "packageManager": "pnpm@9.15.4", + "repository": { + "type": "git", + "url": "https://github.com/PalisadoesFoundation/talawa-api" + }, + "scripts": { + "apply_drizzle_migrations": "drizzle-kit migrate", + "apply_drizzle_test_migrations": "drizzle-kit migrate --config=./test/drizzle.config.ts", + "build_production": "swc ./src/ --ignore \"**/*.spec.ts,**/*.test.ts\" --out-dir ./dist/ --strip-leading-paths", + "check_code_quality": "biome check --error-on-warnings", + "check_drizzle_migrations": "drizzle-kit check", + "check_gql_tada": "gql.tada doctor && gql.tada check --fail-on-warn", + "check_type_errors": "tsc", + "disable_git_hooks": "lefthook uninstall", + "drop_drizzle_migrations": "drizzle-kit drop", + "enable_git_hooks": "lefthook install", + "fix_code_quality": "biome check --error-on-warnings --write", + "generate_drizzle_migrations": "drizzle-kit generate", + "generate_graphql_sdl_file": "tsx ./scripts/generateGraphQLSDLFile.ts", + "generate_gql_tada": "gql.tada generate-output && gql.tada turbo --fail-on-warn", + "push_drizzle_schema": "drizzle-kit push", + "push_drizzle_test_schema": "drizzle-kit push --config=./test/drizzle.config.ts", + "run_tests": "vitest --coverage", + "start_development_server": "tsx watch ./src/index.ts", + "start_development_server_with_debugger": "tsx watch --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./src/index.ts", + "start_production_server": "pnpm build_production && node ./dist/index.js", + "start_production_server_with_debugger": "pnpm build_production && node --inspect=${API_DEBUGGER_HOST:-127.0.0.1}:${API_DEBUGGER_PORT:-9229} ./dist/index.js", + "upgrade_drizzle_metadata": "drizzle-kit up" + }, + "type": "module", + "version": "1.0.0" } + diff --git a/vitest.config.ts b/vitest.config.ts index d242334dc9a..c75b704869e 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,22 +2,23 @@ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [tsconfigPaths()], - test: { - coverage: { - provider: "v8", // or 'istanbul' if you prefer - reporter: ["text", "lcov"], // Specify 'lcov' to generate lcov.info - }, - // https://vitest.dev/config/#fileparallelism - // fileParallelism: true, + plugins: [tsconfigPaths()], + test: { + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov", "html"], // Specify 'lcov' to generate lcov.info + }, + // https://vitest.dev/config/#fileparallelism + // fileParallelism: true, - // https://vitest.dev/config/#globalsetup - globalSetup: ["./test/setup.ts"], + // https://vitest.dev/config/#globalsetup + globalSetup: ["./test/setup.ts"], - // https://vitest.dev/config/#passwithnotests - passWithNoTests: true, + // https://vitest.dev/config/#passwithnotests + passWithNoTests: true, - // // https://vitest.dev/config/#teardowntimeout, - // teardownTimeout: 10000 - }, + // // https://vitest.dev/config/#teardowntimeout, + // teardownTimeout: 10000 + }, }); + From 0d9c5c43d2c7fd1fc8d1e4ab52b76e225025f549 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 12:57:54 +0530 Subject: [PATCH 07/31] added some code in vitest.config.ts --- vitest.config.ts | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index c75b704869e..19486f750ae 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,23 +2,22 @@ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [tsconfigPaths()], - test: { - coverage: { - provider: "v8", // or 'istanbul' if you prefer - reporter: ["text", "lcov", "html"], // Specify 'lcov' to generate lcov.info - }, - // https://vitest.dev/config/#fileparallelism - // fileParallelism: true, + plugins: [tsconfigPaths()], + test: { + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov", "html"], // Specify 'lcov' to generate lcov.info + }, + // https://vitest.dev/config/#fileparallelism + // fileParallelism: true, - // https://vitest.dev/config/#globalsetup - globalSetup: ["./test/setup.ts"], + // https://vitest.dev/config/#globalsetup + globalSetup: ["./test/setup.ts"], - // https://vitest.dev/config/#passwithnotests - passWithNoTests: true, + // https://vitest.dev/config/#passwithnotests + passWithNoTests: true, - // // https://vitest.dev/config/#teardowntimeout, - // teardownTimeout: 10000 - }, + // // https://vitest.dev/config/#teardowntimeout, + // teardownTimeout: 10000 + }, }); - From 836dc81f9e84558ffc3e8319e7f641c7ba6159d3 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:13:31 +0530 Subject: [PATCH 08/31] updated code acc. to coderabbitai suggestions --- .github/workflows/pull-request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4d5032c02a0..4597bd68cdb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -204,6 +204,9 @@ jobs: run: docker compose build - name: Run tests run: docker compose up --exit-code-from api + - name: Copy coverage from container + run: | + docker cp $(docker ps -aqf "name=talawa-api-api-1"):/app/coverage ./coverage - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} uses: codecov/codecov-action@v4 with: From 742df0faaa67c6e0d0548d3f7434cfa00fc30860 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:23:04 +0530 Subject: [PATCH 09/31] updated code acc. to coderabbitai suggestions --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4597bd68cdb..d2051a20828 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -206,7 +206,8 @@ jobs: run: docker compose up --exit-code-from api - name: Copy coverage from container run: | - docker cp $(docker ps -aqf "name=talawa-api-api-1"):/app/coverage ./coverage + CONTAINER_ID=$(docker ps -aq --filter "ancestor=talawa-api") + docker cp $CONTAINER_ID:/app/coverage ./coverage - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} uses: codecov/codecov-action@v4 with: From 415ad591aad585471ba36dedc683ca2dcb0455b2 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:27:19 +0530 Subject: [PATCH 10/31] updated code acc. to coderabbitai suggestions --- .github/workflows/pull-request.yml | 2 +- vitest.config.ts | 37 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d2051a20828..afe96a6bc53 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -207,7 +207,7 @@ jobs: - name: Copy coverage from container run: | CONTAINER_ID=$(docker ps -aq --filter "ancestor=talawa-api") - docker cp $CONTAINER_ID:/app/coverage ./coverage + docker cp $CONTAINER_ID:/home/talawa/api/coverage ./coverage - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} uses: codecov/codecov-action@v4 with: diff --git a/vitest.config.ts b/vitest.config.ts index 19486f750ae..1a98dff7299 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,22 +2,29 @@ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [tsconfigPaths()], - test: { - coverage: { - provider: "v8", // or 'istanbul' if you prefer - reporter: ["text", "lcov", "html"], // Specify 'lcov' to generate lcov.info - }, - // https://vitest.dev/config/#fileparallelism - // fileParallelism: true, + plugins: [tsconfigPaths()], + test: { + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov", "html"], + thresholds: { + lines: 95, + functions: 95, + branches: 95, + statements: 95, + }, // Specify 'lcov' to generate lcov.info + }, + // https://vitest.dev/config/#fileparallelism + // fileParallelism: true, - // https://vitest.dev/config/#globalsetup - globalSetup: ["./test/setup.ts"], + // https://vitest.dev/config/#globalsetup + globalSetup: ["./test/setup.ts"], - // https://vitest.dev/config/#passwithnotests - passWithNoTests: true, + // https://vitest.dev/config/#passwithnotests + passWithNoTests: true, - // // https://vitest.dev/config/#teardowntimeout, - // teardownTimeout: 10000 - }, + // // https://vitest.dev/config/#teardowntimeout, + // teardownTimeout: 10000 + }, }); + From 0021e35a60d55c1fe34becf506ceead1288e4424 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:29:46 +0530 Subject: [PATCH 11/31] updated code acc. to coderabbitai suggestions --- vitest.config.ts | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index 1a98dff7299..cff8bcd80c7 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,29 +2,28 @@ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [tsconfigPaths()], - test: { - coverage: { - provider: "v8", // or 'istanbul' if you prefer - reporter: ["text", "lcov", "html"], - thresholds: { - lines: 95, - functions: 95, - branches: 95, - statements: 95, - }, // Specify 'lcov' to generate lcov.info - }, - // https://vitest.dev/config/#fileparallelism - // fileParallelism: true, + plugins: [tsconfigPaths()], + test: { + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov", "html"], + thresholds: { + lines: 95, + functions: 95, + branches: 95, + statements: 95, + }, // Specify 'lcov' to generate lcov.info + }, + // https://vitest.dev/config/#fileparallelism + // fileParallelism: true, - // https://vitest.dev/config/#globalsetup - globalSetup: ["./test/setup.ts"], + // https://vitest.dev/config/#globalsetup + globalSetup: ["./test/setup.ts"], - // https://vitest.dev/config/#passwithnotests - passWithNoTests: true, + // https://vitest.dev/config/#passwithnotests + passWithNoTests: true, - // // https://vitest.dev/config/#teardowntimeout, - // teardownTimeout: 10000 - }, + // // https://vitest.dev/config/#teardowntimeout, + // teardownTimeout: 10000 + }, }); - From 852fc45e65a54b9ff7424f1bf1d914f80e50c180 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:36:40 +0530 Subject: [PATCH 12/31] updated code acc. to coderabbitai suggestions --- vitest.config.ts | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index cff8bcd80c7..035ebeffb0f 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,28 +2,23 @@ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [tsconfigPaths()], - test: { - coverage: { - provider: "v8", // or 'istanbul' if you prefer - reporter: ["text", "lcov", "html"], - thresholds: { - lines: 95, - functions: 95, - branches: 95, - statements: 95, - }, // Specify 'lcov' to generate lcov.info - }, - // https://vitest.dev/config/#fileparallelism - // fileParallelism: true, + plugins: [tsconfigPaths()], + test: { + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov", "html"], + }, + // https://vitest.dev/config/#fileparallelism + // fileParallelism: true, - // https://vitest.dev/config/#globalsetup - globalSetup: ["./test/setup.ts"], + // https://vitest.dev/config/#globalsetup + globalSetup: ["./test/setup.ts"], - // https://vitest.dev/config/#passwithnotests - passWithNoTests: true, + // https://vitest.dev/config/#passwithnotests + passWithNoTests: true, - // // https://vitest.dev/config/#teardowntimeout, - // teardownTimeout: 10000 - }, + // // https://vitest.dev/config/#teardowntimeout, + // teardownTimeout: 10000 + }, }); + From bbd21c05b9d9840625363c4c2d6ef2d682d831af Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:36:53 +0530 Subject: [PATCH 13/31] updated code acc. to coderabbitai suggestions --- vitest.config.ts | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index 035ebeffb0f..106064717a2 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,23 +2,22 @@ import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [tsconfigPaths()], - test: { - coverage: { - provider: "v8", // or 'istanbul' if you prefer - reporter: ["text", "lcov", "html"], - }, - // https://vitest.dev/config/#fileparallelism - // fileParallelism: true, + plugins: [tsconfigPaths()], + test: { + coverage: { + provider: "v8", // or 'istanbul' if you prefer + reporter: ["text", "lcov", "html"], + }, + // https://vitest.dev/config/#fileparallelism + // fileParallelism: true, - // https://vitest.dev/config/#globalsetup - globalSetup: ["./test/setup.ts"], + // https://vitest.dev/config/#globalsetup + globalSetup: ["./test/setup.ts"], - // https://vitest.dev/config/#passwithnotests - passWithNoTests: true, + // https://vitest.dev/config/#passwithnotests + passWithNoTests: true, - // // https://vitest.dev/config/#teardowntimeout, - // teardownTimeout: 10000 - }, + // // https://vitest.dev/config/#teardowntimeout, + // teardownTimeout: 10000 + }, }); - From af4f58f9ec98f9c3a6c46f3061c0d25157860250 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:42:20 +0530 Subject: [PATCH 14/31] updated code acc. to coderabbitai suggestions --- vitest.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index 106064717a2..11146a0d90d 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,6 +7,12 @@ export default defineConfig({ coverage: { provider: "v8", // or 'istanbul' if you prefer reporter: ["text", "lcov", "html"], + thresholds: { + lines: 20, + functions: 20, + branches: 20, + statements: 20, + }, // Specify 'lcov' to generate lcov.info }, // https://vitest.dev/config/#fileparallelism // fileParallelism: true, From af8f8b2506d48bac2a9195b22873e2e9438954f0 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 13:48:34 +0530 Subject: [PATCH 15/31] updated code acc. to coderabbitai suggestions --- .github/workflows/pull-request.yml | 2 +- vitest.config.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index afe96a6bc53..7d15a5c63c6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -220,7 +220,7 @@ jobs: uses: VeryGoodOpenSource/very_good_coverage@v2 with: path: "./coverage/lcov.info" - min_coverage: 95.0 + min_coverage: 50.0 Test-Docusaurus-Deployment: name: Test Deployment to https://docs-api.talawa.io diff --git a/vitest.config.ts b/vitest.config.ts index 11146a0d90d..cff8bcd80c7 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -8,10 +8,10 @@ export default defineConfig({ provider: "v8", // or 'istanbul' if you prefer reporter: ["text", "lcov", "html"], thresholds: { - lines: 20, - functions: 20, - branches: 20, - statements: 20, + lines: 95, + functions: 95, + branches: 95, + statements: 95, }, // Specify 'lcov' to generate lcov.info }, // https://vitest.dev/config/#fileparallelism From e718f457eef72777a5d749dc4ccecc540457c8b6 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 14:08:41 +0530 Subject: [PATCH 16/31] updated code acc. to coderabbitai suggestions --- .github/workflows/pull-request.yml | 2 +- vitest.config.ts | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7d15a5c63c6..afe96a6bc53 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -220,7 +220,7 @@ jobs: uses: VeryGoodOpenSource/very_good_coverage@v2 with: path: "./coverage/lcov.info" - min_coverage: 50.0 + min_coverage: 95.0 Test-Docusaurus-Deployment: name: Test Deployment to https://docs-api.talawa.io diff --git a/vitest.config.ts b/vitest.config.ts index cff8bcd80c7..106064717a2 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,12 +7,6 @@ export default defineConfig({ coverage: { provider: "v8", // or 'istanbul' if you prefer reporter: ["text", "lcov", "html"], - thresholds: { - lines: 95, - functions: 95, - branches: 95, - statements: 95, - }, // Specify 'lcov' to generate lcov.info }, // https://vitest.dev/config/#fileparallelism // fileParallelism: true, From d6789a477c61dfc16bb7ac934904f7d660756f4f Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 23:26:25 +0530 Subject: [PATCH 17/31] set threshold to 39% --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index afe96a6bc53..bc25b06412e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -220,7 +220,7 @@ jobs: uses: VeryGoodOpenSource/very_good_coverage@v2 with: path: "./coverage/lcov.info" - min_coverage: 95.0 + min_coverage: 39.0 Test-Docusaurus-Deployment: name: Test Deployment to https://docs-api.talawa.io From 10ac35a9bd145dacda7246f3b465f62e70565994 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 23:33:49 +0530 Subject: [PATCH 18/31] updated formatting to make all tests run --- .github/workflows/pull-request.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bc25b06412e..de235a87a6d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -177,18 +177,6 @@ jobs: ISSUE_GUIDELINES.md PR_GUIDELINES.md README.md - - env: - CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} - if: steps.changed_files.outputs.any_changed == 'true' || steps.changed_files.outputs.any_deleted == 'true' - name: Show changed files - run: | - echo "Unauthorized changes were made in the following files:" - for FILE in ${CHANGED_FILES}; do - echo "$FILE" - done - echo "To override this, apply the 'ignore-sensitive-files-pr' label" - exit 1 - Run-Tests: name: Run tests for talawa api runs-on: ubuntu-latest From cb6090f904e89735bda7e4b19e44c9ad0b54eb4a Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Mon, 20 Jan 2025 23:51:39 +0530 Subject: [PATCH 19/31] updated formatting to make all tests run --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index de235a87a6d..492dac1305e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -177,6 +177,7 @@ jobs: ISSUE_GUIDELINES.md PR_GUIDELINES.md README.md + Run-Tests: name: Run tests for talawa api runs-on: ubuntu-latest From b7c499ad047ba2a8eb27563534b7cd564145866f Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal <143436704+VanshikaSabharwal@users.noreply.github.com> Date: Tue, 21 Jan 2025 00:33:29 +0530 Subject: [PATCH 20/31] Update pull-request.yml --- .github/workflows/pull-request.yml | 115 ++++++++++++++++------------- 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 492dac1305e..cb279798574 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -126,58 +126,69 @@ jobs: name: Checks if sensitive files have been changed without authorization needs: [Code-Quality-Checks] runs-on: ubuntu-latest - steps: - - name: Checkout this repository - uses: actions/checkout@v4.2.2 - - id: changed_files - name: Get changed files - uses: tj-actions/changed-files@v45.0.4 - with: - files: | - .coderabbit.yaml - Caddyfile - codegen.ts - Dockerfile* - docker-compose* - .dockerignore - .env.sample - .env_test - eslint.config.mjs - envFiles/** - .gitignore - init-mongo.sh - .prettierignore - .prettierrc.json - .pylintrc - .github/** - biome.jsonc - drizzle_migrations/** - renovate.json - requirements.txt - schema.graphql - CODEOWNERS - LICENSE - tsconfig.json - vitest.config.ts - pnpm-lock.yaml - package.json - package-lock.json - .nojekyll - docs/docusaurus.config.ts - docs/sidebar* - setup.ts - tsconfig.build.json - vite.config.mts - CNAME - CODE_OF_CONDUCT.md - CODE_STYLE.md - CONTRIBUTING.md - DOCUMENTATION.md - INSTALLATION.md - ISSUE_GUIDELINES.md - PR_GUIDELINES.md - README.md - + steps: + - name: Checkout this repository + uses: actions/checkout@v4.2.2 + - id: changed_files + name: Get changed files + uses: tj-actions/changed-files@v45.0.4 + with: + files: | + .coderabbit.yaml + Caddyfile + codegen.ts + Dockerfile* + docker-compose* + .dockerignore + .env.sample + .env_test + eslint.config.mjs + envFiles/** + .gitignore + init-mongo.sh + .prettierignore + .prettierrc.json + .pylintrc + .github/** + biome.jsonc + drizzle_migrations/** + renovate.json + requirements.txt + schema.graphql + CODEOWNERS + LICENSE + tsconfig.json + vitest.config.ts + pnpm-lock.yaml + package.json + package-lock.json + .nojekyll + docs/docusaurus.config.ts + docs/sidebar* + setup.ts + tsconfig.build.json + vite.config.mts + CNAME + CODE_OF_CONDUCT.md + CODE_STYLE.md + CONTRIBUTING.md + DOCUMENTATION.md + INSTALLATION.md + ISSUE_GUIDELINES.md + PR_GUIDELINES.md + README.md + - env: + CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + if: steps.changed_files.outputs.any_changed == 'true' || steps.changed_files.outputs.any_deleted == 'true' + name: Show changed files + run: | + echo "Unauthorized changes were made in the following files:" + for FILE in ${CHANGED_FILES}; do + echo "$FILE" + done + echo "To override this, apply the 'ignore-sensitive-files-pr' label" + exit 1 + Run-Tests: name: Run tests for talawa api runs-on: ubuntu-latest From d077837e44c5a91eede443653cfb852def6f66d1 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal <143436704+VanshikaSabharwal@users.noreply.github.com> Date: Tue, 21 Jan 2025 00:38:53 +0530 Subject: [PATCH 21/31] Update pull-request.yml --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index cb279798574..97dca1e765a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -126,7 +126,7 @@ jobs: name: Checks if sensitive files have been changed without authorization needs: [Code-Quality-Checks] runs-on: ubuntu-latest - steps: + steps: - name: Checkout this repository uses: actions/checkout@v4.2.2 - id: changed_files From edd75c0bcc5aa85de87a8e8e05926b5ce3276ba2 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Tue, 21 Jan 2025 11:40:02 +0530 Subject: [PATCH 22/31] updated push-deploy-website.yml --- .github/workflows/push-deploy-website.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/push-deploy-website.yml b/.github/workflows/push-deploy-website.yml index a5feec11ea3..9b484cc84e0 100644 --- a/.github/workflows/push-deploy-website.yml +++ b/.github/workflows/push-deploy-website.yml @@ -46,6 +46,20 @@ jobs: - uses: webfactory/ssh-agent@v0.9.0 with: ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }} + + - name: Run Tests and Upload Coverage to Codecov + run: | + pnpm install --frozen-lockfile + pnpm run test + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + - name: Deploy to GitHub Pages env: USE_SSH: true @@ -62,3 +76,4 @@ jobs: echo "Deployment failed" exit 1 fi + From 05e7876ea017e882515ea05ac91346c49e6e79fe Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Tue, 21 Jan 2025 12:00:40 +0530 Subject: [PATCH 23/31] updated push-deploy-website.yml --- .github/workflows/push-deploy-website.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push-deploy-website.yml b/.github/workflows/push-deploy-website.yml index 9b484cc84e0..405acb2c3fa 100644 --- a/.github/workflows/push-deploy-website.yml +++ b/.github/workflows/push-deploy-website.yml @@ -59,6 +59,7 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} verbose: true + files: ./coverage/lcov.info - name: Deploy to GitHub Pages env: From 83a30726f46640dd89901557790161823cb7d76c Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Wed, 22 Jan 2025 10:33:41 +0530 Subject: [PATCH 24/31] added push.yml --- .github/push.yml | 31 +++++++++++++++++++++++ .github/workflows/push-deploy-website.yml | 14 ---------- 2 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 .github/push.yml diff --git a/.github/push.yml b/.github/push.yml new file mode 100644 index 00000000000..d73de9ebecd --- /dev/null +++ b/.github/push.yml @@ -0,0 +1,31 @@ +name: Push Workflow for develop-postgres + +on: + push: + branches: + - develop-postgres + +jobs: + test-and-upload-coverage: + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout code + uses: actions/checkout@v3 + + # Install dependencies and run tests + - name: Run Tests and Upload Coverage to Codecov + run: | + pnpm install --frozen-lockfile + pnpm run test + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + # Upload coverage to Codecov + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + files: ./coverage/lcov.info diff --git a/.github/workflows/push-deploy-website.yml b/.github/workflows/push-deploy-website.yml index 405acb2c3fa..257b9476f68 100644 --- a/.github/workflows/push-deploy-website.yml +++ b/.github/workflows/push-deploy-website.yml @@ -47,20 +47,6 @@ jobs: with: ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }} - - name: Run Tests and Upload Coverage to Codecov - run: | - pnpm install --frozen-lockfile - pnpm run test - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - files: ./coverage/lcov.info - - name: Deploy to GitHub Pages env: USE_SSH: true From 71c8d06f2d78ccfcef33fa68da26047a5c793e78 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Wed, 22 Jan 2025 10:35:34 +0530 Subject: [PATCH 25/31] added push.yml --- .github/workflows/push-deploy-website.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/push-deploy-website.yml b/.github/workflows/push-deploy-website.yml index 257b9476f68..a5feec11ea3 100644 --- a/.github/workflows/push-deploy-website.yml +++ b/.github/workflows/push-deploy-website.yml @@ -46,7 +46,6 @@ jobs: - uses: webfactory/ssh-agent@v0.9.0 with: ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }} - - name: Deploy to GitHub Pages env: USE_SSH: true @@ -63,4 +62,3 @@ jobs: echo "Deployment failed" exit 1 fi - From 72b66cbef28b9cfbbde4418619221532277eebc2 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Thu, 23 Jan 2025 12:04:11 +0530 Subject: [PATCH 26/31] added push.yml in .github --- .github/{ => workflows}/push.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/push.yml (100%) diff --git a/.github/push.yml b/.github/workflows/push.yml similarity index 100% rename from .github/push.yml rename to .github/workflows/push.yml From 919c56b8b24266fc95936228f9cff816dfaf5c3e Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Thu, 23 Jan 2025 13:40:42 +0530 Subject: [PATCH 27/31] added some updates to push.yml --- .github/workflows/push.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d73de9ebecd..8e9601f6af3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,6 +14,11 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + # Install pnpm + - name: Install pnpm + run: | + curl -fsSL https://get.pnpm.io/install.sh | sh - + # Install dependencies and run tests - name: Run Tests and Upload Coverage to Codecov run: | From 6358a0b35dc14c80adeec4993a64abb3950f0292 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Thu, 23 Jan 2025 13:42:54 +0530 Subject: [PATCH 28/31] added some updates to push.yml --- .github/workflows/push.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d73de9ebecd..8e9601f6af3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,6 +14,11 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + # Install pnpm + - name: Install pnpm + run: | + curl -fsSL https://get.pnpm.io/install.sh | sh - + # Install dependencies and run tests - name: Run Tests and Upload Coverage to Codecov run: | From 234968837807d015a830aff0b49ab9960d834717 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal Date: Thu, 23 Jan 2025 18:49:04 +0530 Subject: [PATCH 29/31] using npm to install pnpm in push.yml --- .github/workflows/push.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8e9601f6af3..7e24be59c94 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,8 +16,7 @@ jobs: # Install pnpm - name: Install pnpm - run: | - curl -fsSL https://get.pnpm.io/install.sh | sh - + run: npm install -g pnpm # Install dependencies and run tests - name: Run Tests and Upload Coverage to Codecov From 5d62a165bd7a5fba1a95133cfca1f80437a5c82a Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal <143436704+VanshikaSabharwal@users.noreply.github.com> Date: Thu, 23 Jan 2025 22:54:43 +0530 Subject: [PATCH 30/31] Update push.yml --- .github/workflows/push.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7e24be59c94..4e16e28924c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,9 +14,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # Install pnpm - - name: Install pnpm - run: npm install -g pnpm + # Setup pnpm + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + cache: pnpm + cache-dependency-path: | + docs/pnpm-lock.yaml + docs/package.json # Install dependencies and run tests - name: Run Tests and Upload Coverage to Codecov From 6ffd1e2f14dd326d440a8718308b1517864714d1 Mon Sep 17 00:00:00 2001 From: Vanshika Sabharwal <143436704+VanshikaSabharwal@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:09:08 +0530 Subject: [PATCH 31/31] Update push.yml --- .github/workflows/push.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4e16e28924c..9810daf7cb2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,10 +18,8 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 with: + version: 8 cache: pnpm - cache-dependency-path: | - docs/pnpm-lock.yaml - docs/package.json # Install dependencies and run tests - name: Run Tests and Upload Coverage to Codecov