-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to a monorepo, and merge devfaq-api and devfaq-www
- Loading branch information
Showing
261 changed files
with
15,090 additions
and
789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# version: 2.1 | ||
# orbs: | ||
# node: circleci/node@1.1.6 | ||
|
||
# jobs: | ||
# www: | ||
# docker: | ||
# - image: circleci/node:12-browsers | ||
# steps: | ||
# - run: | | ||
# if [ "$CIRCLE_BRANCH" = "develop" ] || [ "$CIRCLE_BRANCH" = "master" ]; then | ||
# circleci-agent step halt | ||
# fi | ||
|
||
# - checkout | ||
# - node/with-cache: | ||
# steps: | ||
# - run: yarn install --frozen-lockfile | ||
|
||
# - run: yarn get-base-branch | ||
# - run: git status | ||
# - run: yarn workspace www build > analyze.next | ||
# - run: cat analyze.next | ||
# - run: yarn create-size && mv size-snapshot.json /tmp/current-size-snapshot.json | ||
# - run: rm analyze.next && rm -rf .next | ||
|
||
# - run: git fetch && git checkout $(cat /tmp/.basebranch) && git reset --hard origin/$(cat /tmp/.basebranch) | ||
# - run: git status | ||
# - run: yarn install --frozen-lockfile | ||
# - run: yarn workspace www build > analyze.next | ||
# - run: cat analyze.next | ||
# - run: mv analyze.next /tmp/ | ||
|
||
# - run: git fetch && git checkout $CIRCLE_BRANCH && git reset --hard origin/$CIRCLE_BRANCH | ||
# - run: git status | ||
# - run: yarn install --frozen-lockfile | ||
|
||
# - run: mv /tmp/analyze.next ./ | ||
# - run: yarn create-size && mv size-snapshot.json previous-size-snapshot.json | ||
# - run: mv /tmp/current-size-snapshot.json ./ | ||
|
||
# # - run: mkdir -p /tmp/lighthouse/ | ||
# - run: yarn workspace www danger ci | ||
|
||
# - store_artifacts: | ||
# path: ./current-size-snapshot.json | ||
# # - store_artifacts: | ||
# # path: /tmp/lighthouse | ||
|
||
# workflows: | ||
# www: | ||
# jobs: | ||
# - www: | ||
# filters: | ||
# branches: | ||
# ignore: | ||
# - /dependabot\/*/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"plugins": [], | ||
"extends": ["react-app", "prettier", "plugin:import/typescript"], | ||
"extends": ["prettier", "plugin:import/typescript"], | ||
"rules": { | ||
"no-const-assign": "error", | ||
"import/no-anonymous-default-export": "error", | ||
"import/dynamic-import-chunkname": "error", | ||
"import/order": ["error", { "newlines-between": "always", "alphabetize": { "order": "asc" } }], | ||
"import/no-duplicates": "error", | ||
"import/no-cycle": "error", | ||
"react-hooks/exhaustive-deps": ["error", { "additionalHooks": "useCustomCompareMemo" }], | ||
"@typescript-eslint/no-unused-vars": 0, | ||
"jsx-a11y/anchor-is-valid": 0 | ||
"@typescript-eslint/no-unused-vars": "off" | ||
} | ||
} |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
packages/api/.github/workflows/deploy.yml → .github/workflows/deploy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: Test and Build | ||
|
||
on: | ||
pull_request: | ||
branches: [develop, master] | ||
|
||
jobs: | ||
test_www: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 100 | ||
|
||
- uses: marceloprado/has-changed-path@master | ||
id: changed-www | ||
with: | ||
paths: apps/www | ||
|
||
- name: Read .nvmrc | ||
if: steps.changed-www.outputs.changed == 'true' | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
id: nvm | ||
- name: Use Node.js | ||
if: steps.changed-www.outputs.changed == 'true' | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
|
||
- name: Get yarn cache directory path | ||
if: steps.changed-www.outputs.changed == 'true' | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache Node.js modules | ||
if: steps.changed-www.outputs.changed == 'true' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
if: steps.changed-www.outputs.changed == 'true' | ||
run: yarn workspace www install --frozen-lockfile | ||
|
||
- name: Run tests | ||
if: steps.changed-www.outputs.changed == 'true' | ||
run: yarn workspace www test | ||
|
||
- name: Run build | ||
if: steps.changed-www.outputs.changed == 'true' | ||
run: yarn workspace www build | ||
|
||
test_api: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 100 | ||
|
||
- uses: marceloprado/has-changed-path@master | ||
id: changed-api | ||
with: | ||
paths: apps/api | ||
|
||
- name: Setup PostgreSQL | ||
if: steps.changed-api.outputs.changed == 'true' | ||
uses: Harmon758/postgresql-action@v1.0.0 | ||
with: | ||
postgresql version: 12-alpine | ||
postgresql db: database_development | ||
postgresql user: postgres | ||
postgresql password: -api2018 | ||
|
||
- name: Read .nvmrc | ||
if: steps.changed-api.outputs.changed == 'true' | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
id: nvm | ||
- name: Use Node.js | ||
if: steps.changed-api.outputs.changed == 'true' | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
- name: Get yarn cache directory path | ||
if: steps.changed-api.outputs.changed == 'true' | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache Node.js modules | ||
if: steps.changed-api.outputs.changed == 'true' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
if: steps.changed-api.outputs.changed == 'true' | ||
run: yarn workspace api install --frozen-lockfile | ||
|
||
- name: Run tests | ||
if: steps.changed-api.outputs.changed == 'true' | ||
run: yarn workspace api test | ||
|
||
- name: Run build for dependabot | ||
if: steps.changed-api.outputs.changed == 'true' && (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') | ||
run: yarn workspace api build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# DevFAQ | ||
|
||
![Test and Build](https://github.com/typeofweb/devfaq/workflows/Test%20and%20Build/badge.svg) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=typeofweb_devfaq&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=typeofweb_devfaq) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftypeofweb%2Fdevfaq.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftypeofweb%2Fdevfaq?ref=badge_shield) [![Discord](https://img.shields.io/discord/440163731704643589?color=738ADB&label=Discord&logo=discord&logoColor=white)](https://discord.typeofweb.com/) | ||
|
||
|
||
## License | ||
|
||
AGPL 3.0 | ||
|
||
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftypeofweb%2Fdevfaq.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftypeofweb%2Fdevfaq?ref=badge_large) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PORT=3002 | ||
DB_USERNAME=postgres | ||
DB_PASSWORD=-api2018 | ||
DB_NAME=database_development | ||
DB_HOSTNAME=127.0.0.1 | ||
SENTRY_DSN= | ||
|
||
COOKIE_DOMAIN="devfaq.localhost" | ||
COOKIE_PASSWORD="Xj-#?B#f+1#agiD8QiQvh=RLhy;+Ybj|/+f#|KPH5bs20w<e1:K_m{o>^pN@X]q1" | ||
|
||
GITHUB_CLIENT_ID=e65b7b90cd7d2a85acd8 | ||
GITHUB_CLIENT_SECRET=30087b1687598ce76ffa30ac5b6d3a45a7da9a17 | ||
GITHUB_PASSWORD="g-X,-/O7oJ[EWVvE#*aK*!UKDS/zoudbEn!1T+`Ud|n(25EU/*gO::6QnffK+IZ`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"root": false, | ||
"extends": ["plugin:import/errors"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["src/models/*.ts"], | ||
"rules": { | ||
"import/no-cycle": "off" | ||
} | ||
} | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.