Skip to content

Commit

Permalink
Revert "merged develop into develop-userTypeFix branch (#1931)" (#1953)
Browse files Browse the repository at this point in the history
This reverts commit c4b25b1.
  • Loading branch information
palisadoes authored Mar 5, 2024
1 parent c4b25b1 commit 36b2f95
Show file tree
Hide file tree
Showing 194 changed files with 2,974 additions and 14,731 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml.archive
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-codescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
64 changes: 9 additions & 55 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository content
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Count number of lines
run: |
chmod +x ./.github/workflows/countline.py
./.github/workflows/countline.py --lines 600 --exclude_files src/types/generatedGraphQLTypes.ts tests
- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v4
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -85,14 +80,14 @@ jobs:
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v2

- name: Checkout code
run: git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-branch
working-directory: ${{ github.workspace }}

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v2
with:
python-version: '3.11.6'

Expand Down Expand Up @@ -134,28 +129,10 @@ jobs:
MONGO_DB_URL: mongodb://localhost:27017/talawa-test-db
REDIS_HOST: localhost
REDIS_PORT: 6379
RECAPTCHA_SITE_KEY: ${{secrets.RECAPTCHA_SITE_KEY}}
RECAPTCHA_SECRET_KEY: ${{secrets.RECAPTCHA_SECRET_KEY}}
MAIL_USERNAME: ${{secrets.MAIL_USERNAME}}
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}
IS_SMTP: ""
SMTP_HOST: ""
SMTP_PASSWORD: ""
SMTP_USERNAME: ""
LAST_RESORT_SUPERADMIN_EMAIL: "[email protected]"
COLORIZE_LOGS: "true"
LOG_LEVEL: "info"
# ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
# REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
uses: actions/checkout@v3

- name: Generate Access Token Secret
run: echo "ACCESS_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV
Expand All @@ -164,7 +141,7 @@ jobs:
run: echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v3

- name: Install dependencies
run: npm ci
Expand All @@ -176,35 +153,12 @@ jobs:

- name: Run the tests
run: npm run test

- name: Start the development server
run: |
npm run dev &
echo "Development server started..."
- name: Check server status
run: |
if curl -f 'http://localhost:4000' | jq -e '. == {"talawa-version":"v1","status":"healthy"}' > /dev/null; then
echo "Server is up and healthy"
else
echo "Server is down"
exit 1
fi
- name: Check Apollo Server status
run: |
if curl -f 'http://localhost:4000/graphql?query=%7B__typename%7D' \
-H 'Apollo-Require-Preflight: true' | jq -e '. == {"data":{"__typename":"Query"}}' > /dev/null; then
echo "Apollo Server is up"
else
echo "Server is down"
exit 1
fi

- 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@v4
uses: codecov/codecov-action@v3
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -216,13 +170,13 @@ jobs:
with:
path: './coverage/lcov.info'
min_coverage: 95.0

JSDocs:
name: 'JSDocs comments and pipeline'
runs-on: ubuntu-latest
needs: Test-Application
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: 'Check whether comments exists for JSDocs'
run: |
chmod +x ./.github/workflows/check-jsdocs-comment.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: github.ref == 'refs/heads/automated-docs'
# needs: Generate-Documentation
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# This is done as we will use the Talawa-Docs repository later too
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
token: ${{ secrets.TALAWA_DOCS_SYNC }}
path: api
Expand All @@ -60,7 +60,7 @@ jobs:
run: echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v3

# Move into the api folder before installing the dependencies
- name: Install dependencies
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
# We will clone the Talawa Docs in the folder called docs so that we can copy the generated
# schema.json into the same later
- name: Checkout the Talawa-Docs repository
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
repository: PalisadoesFoundation/talawa-docs
token: ${{ secrets.TALAWA_DOCS_SYNC }}
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
# This is done as we will use the Talawa-Docs repository later too
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Generate Access Token Secret
run: echo "ACCESS_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV
Expand All @@ -70,7 +70,7 @@ jobs:
run: echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v3

- name: Install dependencies
run: npm ci
Expand All @@ -86,24 +86,22 @@ jobs:

# Upload Coverage
- name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'


Generate-Documentation:
name: Generate Documentation
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
needs: Push-Workflow
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# persist-credentials: false
uses: actions/checkout@v3

- name: Generate Documentation of HTML pages
run: |
npm install --global typedoc
Expand Down Expand Up @@ -144,7 +142,7 @@ jobs:
git push -f https://[email protected]/PalisadoesFoundation/talawa-api.git HEAD:automated-docs
echo -e "🚀${Green} Hurrah! doc updated${NoColor}"
env:
ACCESS_TOKEN: ${{secrets.GH_TOKEN}}
ACCESS_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Create Documentation Artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -212,11 +210,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v4
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand Down
10 changes: 5 additions & 5 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ You will need to have copies of your code on your local system. Here's how to do

## Install node.js

Best way to install and manage `node.js` is making use of node version managers. Two most popular node version managers right now are [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). We'd recommend `fnm` because it's written in `rust` and is much faster than `nvm`. Install whichever one you want and follow their guide to set up `node.js` on your system ensure the installation of Node.js version 20 LTS.
Best way to install and manage `node.js` is making use of node version managers. Two most popular node version managers right now are [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). We'd recommend `fnm` because it's written in `rust` and is much faster than `nvm`. Install whichever one you want and follow their guide to set up `node.js` on your system ensure the installation of Node.js version 20 LTS.

_**NOTE**_

Expand Down Expand Up @@ -211,10 +211,10 @@ Talawa-api makes use of `Redis` for caching frequently accessed data items in th
```bash
redis-cli
```
- **Step 6**:
- **Step 6**:
- Use these parameters when running the setup script if you have configured the server on your local machine:
- Redis Host: `localhost`
- Redis Port: `6379` (default Redis port)
- Redis Host: `localhost`
- Redis Port: `6379` (default Redis port)

2. `For Windows Users using WSL`:

Expand Down Expand Up @@ -248,7 +248,7 @@ If you'd rather not deal with the hassle of setting up WSL on your computer, the
redis-cli
```

- **Step 7**:
- **Step 7**:
- Use these parameters when running the setup script if you have configured the server on your local machine:
- Redis Host: `localhost`
- Redis Port: `6379` (default Redis port)
Expand Down
7 changes: 0 additions & 7 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const config: CodegenConfig = {
AppUserProfile: "../models/AppUserProfile#InterfaceAppUserProfile",
AgendaCategory: "../models/AgendaCategory#InterfaceAgendaCategory",

Advertisement: "../models/Advertisement#InterfaceAdvertisement",

CheckIn: "../models/CheckIn#InterfaceCheckIn",

MessageChat: "../models/MessageChat#InterfaceMessageChat",
Expand All @@ -55,11 +53,6 @@ const config: CodegenConfig = {
EventVolunteer: "../models/EventVolunteer#InterfaceEventVolunteer",

Feedback: "../models/Feedback#InterfaceFeedback",
Fund: "../models/Fund#InterfaceFund",
FundraisingCampaign:
"../models/FundraisingCampaign#InterfaceFundraisingCampaign",
FundraisingCampaignPledge:
"../models/FundraisingCampaignPledge#InterfaceFundraisingCampaignPledges",

// File: '../models/File#InterfaceFile',

Expand Down
Loading

0 comments on commit 36b2f95

Please sign in to comment.