Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Jan 17, 2024
2 parents a048bb4 + ad3e16e commit 24ac7fb
Show file tree
Hide file tree
Showing 500 changed files with 42,759 additions and 2,147 deletions.
28 changes: 14 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@
],

// restrict the use of same package in multiple import statements
"import/no-duplicates": "warn",
"import/no-duplicates": "error",

// warn/1, error/2, off/0
"tsdoc/syntax": "warn",
"tsdoc/syntax": "error",

// Typescript Rules
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-duplicate-enum-values": "warn",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",

// Typescript rule to enforce PascalCase naming convention for types and interfaces
"@typescript-eslint/naming-convention": [
Expand Down Expand Up @@ -115,9 +115,9 @@
],

// Typescript additional rules
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-function-return-type": "warn"
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error"
}
}
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# You can find the deployment instructions in the scripts/cloud-api-demo/README.md file
name: Deploy to Cloud VPS

on:
push:
branches:
- develop

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Execute remote ssh commands
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.API_DEMO_HOST }}
username: ${{ secrets.API_DEMO_USERNAME }}
key: ${{ secrets.API_DEMO_SSH_KEY }}
port: ${{ secrets.API_DEMO_PORT }}
command_timeout: 30m
script: |
/usr/local/bin/deploy.sh
20 changes: 18 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Run ESLint to check for linting errors
run: npm run lint:check
- name: Run ESLint to check for linting errors in modified files
run: npx eslint $(git diff --name-only --diff-filter=d -- '***.ts' ${{ github.event.before }} ${{ github.sha }})

- name: Check for formatting errors
run: npm run format:check
Expand Down Expand Up @@ -141,6 +141,9 @@ jobs:
- name: Run the tests
run: npm run test

- name: Import Sample Data
run: npm run import:sample-data

- name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -168,3 +171,16 @@ jobs:
- name: 'Run JSDocs'
if: env.RUN_JSDOCS == 'True'
run: echo "Run JSdocs :${{ env.RUN_JSDOCS }}"

Branch-check:
name: "Base branch check"
runs-on: ubuntu-latest
steps:
- name: "Check if base branch is develop"
if: github.event.pull_request.base.ref != 'develop'
run: |
echo "PR is not against develop branch. Please refer PR_GUIDELINES.md"
exit 1

4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ jobs:
- uses: actions/checkout@v3
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'talawa-api-docs/'
destination_repo: 'PalisadoesFoundation/talawa-docs'
destination_branch: 'testing-workflows'
destination_branch: 'develop'
destination_folder: 'docs/'
user_email: '${{env.email}}'
user_name: '${{github.actor}}'
Expand Down
16 changes: 13 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@ docs/schema.json
# Ignore redis binary dump (dump.rdb) files
*.rdb

# Miscellaneous files
# No node modules
node_modules/**

node_modules
# No editor related files
.idea
.vscode

# Don't upload configuration files
.env

# Ignore uploads
image/**
images/**
video/**
videos/**
.vscode

# Don't ignore any .gitignore files in any location
!.gitignore

# Added as the documentation only refers to npm, not yarn and pnpm.
yarn.lock
Expand Down
6 changes: 2 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
# Change to the current directory
. "$(dirname -- "$0")/_/husky.sh"

# Formats code using prettier.
npm run format:fix

# Checks code for typescript type errors and throws errors if found.
npm run typecheck

# Formats code using prettier
# Checks and fixes all lint issues in code which don't require manual intervention.
# Throws errors if lint issues requiring manual intervention are found in code.
npm run lint:fix
npm run lint-staged

npm run gen:schema

Expand Down
Loading

0 comments on commit 24ac7fb

Please sign in to comment.