Skip to content

Commit 55e962d

Browse files
Merge pull request #61 from topcoder-platform/dev-merge
Dev merge
2 parents e5e79d9 + ff1ff06 commit 55e962d

File tree

12,718 files changed

+953831
-36826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,718 files changed

+953831
-36826
lines changed

.eslintrc.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"plugin:jsx-a11y/recommended",
1818
"prettier"
1919
],
20+
"plugins": ["no-only-tests"],
2021
"globals": {
2122
"Promise": true,
2223
"window": true,
@@ -31,11 +32,12 @@
3132
}
3233
},
3334
"rules": {
34-
"import/named": 2,
35-
"import/no-named-as-default": 0,
36-
"import/no-named-as-default-member": 0,
37-
"import/order": 2,
38-
"react/prop-types": "off"
35+
"import/named": "error",
36+
"import/no-named-as-default": "off",
37+
"import/no-named-as-default-member": "off",
38+
"import/order": "error",
39+
"react/prop-types": "off",
40+
"no-only-tests/no-only-tests": "error"
3941
},
4042
"overrides": [
4143
{
@@ -66,7 +68,20 @@
6668
"leadingUnderscore": "allow",
6769
"trailingUnderscore": "allow"
6870
},
69-
71+
{
72+
"selector": [
73+
"classProperty",
74+
"objectLiteralProperty",
75+
"typeProperty",
76+
"classMethod",
77+
"objectLiteralMethod",
78+
"typeMethod",
79+
"accessor",
80+
"enumMember"
81+
],
82+
"format": null,
83+
"modifiers": ["requiresQuotes"]
84+
},
7085
{
7186
"selector": "variable",
7287
"format": ["camelCase", "UPPER_CASE", "PascalCase"],

.github/workflows/autoclose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Autoclose
1+
name: GitHub - Autoclose Invalid PRs
22
on:
33
pull_request_target:
44
branches:
@@ -10,7 +10,7 @@ jobs:
1010
autoclose:
1111
runs-on: ubuntu-20.04
1212
steps:
13-
- uses: actions/github-script@v6
13+
- uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # tag=v6
1414
with:
1515
github-token: ${{secrets.GITHUB_TOKEN}}
1616
script: |

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
name: 'CodeQL'
2-
1+
name: CI - Run CodeQL Analysis
32
on:
43
push:
54
branches: [main]
@@ -31,10 +30,10 @@ jobs:
3130
language: ['javascript']
3231
steps:
3332
- name: Checkout repository
34-
uses: actions/checkout@v3
33+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
3534
- name: Setup CodeQL
36-
uses: github/codeql-action/init@v1
35+
uses: github/codeql-action/init@d5cec099b513fccc2cfcc9247113ecc9edbdacc5 # tag=v1
3736
with:
3837
languages: ${{ matrix.language }}
3938
- name: Perform Analysis
40-
uses: github/codeql-action/analyze@v1
39+
uses: github/codeql-action/analyze@d5cec099b513fccc2cfcc9247113ecc9edbdacc5 # tag=v1

.github/workflows/codesee-diagram.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: CI - Create CodeSee Maps
12
on:
23
workflow_dispatch:
34
schedule:
@@ -8,8 +9,6 @@ on:
89
- 'docs/**'
910
types: [opened, synchronize, reopened]
1011

11-
name: CodeSee Map
12-
1312
jobs:
1413
test_map_action:
1514
runs-on: ubuntu-20.04
@@ -19,7 +18,7 @@ jobs:
1918
steps:
2019
- name: checkout
2120
id: checkout
22-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2322
with:
2423
repository: ${{ github.event.pull_request.head.repo.full_name }}
2524
ref: ${{ github.event.pull_request.head.ref }}
@@ -31,7 +30,7 @@ jobs:
3130
uses: Codesee-io/codesee-detect-languages-action@latest
3231

3332
- name: Configure JDK 16
34-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 # tag=v3
3534
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
3635
with:
3736
java-version: '16'
@@ -40,14 +39,13 @@ jobs:
4039
# CodeSee Maps Go support uses a static binary so there's no setup step required.
4140

4241
- name: Configure Node.js 16
43-
uses: actions/setup-node@v3
42+
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
4443
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
4544
with:
4645
node-version: '16'
47-
cache: npm
4846

4947
- name: Configure Python 3.x
50-
uses: actions/setup-python@v3
48+
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
5149
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
5250
with:
5351
python-version: '3.x'

.github/workflows/crowdin-download.client-ui.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin Client UI Download
1+
name: i18n - Download Client UI
22
on:
33
workflow_dispatch:
44
schedule:
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Source Files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2222
with:
2323
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
2424

@@ -209,6 +209,35 @@ jobs:
209209
# Uncomment below to debug
210210
# dryrun_action: true
211211

212+
##### Download German #####
213+
- name: Crowdin Download German Translations
214+
uses: crowdin/github-action@master
215+
# options: https://github.com/crowdin/github-action/blob/master/action.yml
216+
with:
217+
# uploads
218+
upload_sources: false
219+
upload_translations: false
220+
auto_approve_imported: false
221+
import_eq_suggestions: false
222+
223+
# downloads
224+
download_translations: true
225+
download_language: de
226+
skip_untranslated_files: false
227+
export_only_approved: true
228+
229+
push_translations: false
230+
231+
# pull-request
232+
create_pull_request: false
233+
234+
# global options
235+
config: './crowdin-config.yml'
236+
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
237+
238+
# Uncomment below to debug
239+
# dryrun_action: true
240+
212241
# Create Commit
213242
- name: Commit Changes
214243
uses: freecodecamp/crowdin-action@main

.github/workflows/crowdin-download.curriculum.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin Curriculum Download
1+
name: i18n - Download Curriculum
22
on:
33
workflow_dispatch:
44
schedule:
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Source Files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2222
with:
2323
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
2424

@@ -209,6 +209,35 @@ jobs:
209209
# Uncomment below to debug
210210
# dryrun_action: true
211211

212+
##### Download German #####
213+
- name: Crowdin Download German Translations
214+
uses: crowdin/github-action@master
215+
# options: https://github.com/crowdin/github-action/blob/master/action.yml
216+
with:
217+
# uploads
218+
upload_sources: false
219+
upload_translations: false
220+
auto_approve_imported: false
221+
import_eq_suggestions: false
222+
223+
# downloads
224+
download_translations: true
225+
download_language: de
226+
skip_untranslated_files: true
227+
export_only_approved: true
228+
229+
push_translations: false
230+
231+
# pull-request
232+
create_pull_request: false
233+
234+
# global options
235+
config: './crowdin-config.yml'
236+
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
237+
238+
# Uncomment below to debug
239+
# dryrun_action: true
240+
212241
# Create Commit
213242
- name: Commit Changes
214243
uses: freecodecamp/crowdin-action@main

.github/workflows/crowdin-download.docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin Docs Download
1+
name: i18n - Download Docs
22
on:
33
workflow_dispatch:
44
schedule:
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Source Files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2222
with:
2323
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
2424

.github/workflows/crowdin-upload.client-ui.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin Client UI Upload
1+
name: i18n - Upload Client UI
22
on:
33
workflow_dispatch:
44
schedule:
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Source Files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2222

2323
- name: Generate Crowdin Config
2424
uses: freecodecamp/crowdin-action@main

.github/workflows/crowdin-upload.curriculum.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin Curriculum Upload
1+
name: i18n - Upload Curriculum
22
on:
33
workflow_dispatch:
44
schedule:
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Source Files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2222

2323
- name: Generate Crowdin Config
2424
uses: freecodecamp/crowdin-action@main

.github/workflows/crowdin-upload.docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin Docs Upload
1+
name: i18n - Upload Docs
22
on:
33
workflow_dispatch:
44
schedule:
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Source Files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2222

2323
- name: Generate Crowdin Config
2424
uses: freecodecamp/crowdin-action@main
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI - Cypress (e2e) 3rd party donation tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
do-everything:
9+
name: Build
10+
runs-on: ubuntu-20.04
11+
strategy:
12+
fail-fast: false
13+
services:
14+
mongodb:
15+
image: mongo:4
16+
ports:
17+
- 27017:27017
18+
# We need mailhog to catch any emails the api tries to send.
19+
mailhog:
20+
image: mailhog/mailhog
21+
ports:
22+
- 1025:1025
23+
24+
steps:
25+
- name: Checkout Source Files
26+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
27+
28+
- name: Checkout client-config
29+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
30+
with:
31+
repository: freeCodeCamp/client-config
32+
path: client-config
33+
34+
- name: Use Node.js 16.x
35+
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3
36+
with:
37+
node-version: 16.x
38+
cache: 'npm'
39+
40+
- name: Set freeCodeCamp Environment Variables
41+
run: |
42+
sed '/STRIPE/d; /PAYPAL/d;' sample.env > .env
43+
echo 'STRIPE_PUBLIC_KEY=${{ secrets.STRIPE_PUBLIC_KEY }}' >> .env
44+
echo 'STRIPE_SECRET_KEY=${{ secrets.STRIPE_SECRET_KEY }}' >> .env
45+
echo 'PAYPAL_CLIENT_ID=${{ secrets.PAYPAL_CLIENT_ID }}' >> .env
46+
echo 'PAYPAL_SECRET=${{ secrets.PAYPAL_SECRET }}' >> .env
47+
48+
- name: Install and Build
49+
run: |
50+
npm ci
51+
npm run build
52+
- name: Seed Database
53+
run: npm run seed
54+
- name: Move serve.json to Public Folder
55+
run: cp client-config/serve.json client/public/serve.json
56+
57+
- name: Cypress run
58+
uses: cypress-io/github-action@v2
59+
with:
60+
record: ${{ env.CYPRESS_RECORD_KEY != 0 }}
61+
start: npm run start-ci
62+
wait-on: http://localhost:8000
63+
wait-on-timeout: 1200
64+
config: baseUrl=http://localhost:8000
65+
browser: chrome
66+
headless: true
67+
spec: cypress/integration/third-party/*.js

0 commit comments

Comments
 (0)