Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Stack Assessment Project v2 upgrade #454

Merged
merged 43 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
93cde76
Full Stack Assessment Project v2 upgrade
sztupy Jan 26, 2024
d7bb957
add setup for deployment
Mar 27, 2024
f7b9fcc
change object key in json response
Mar 27, 2024
9622434
display videos on frontend
Mar 28, 2024
c787fc1
extract youtube id for video iframe
Mar 28, 2024
4e1b9f2
Revert "extract youtube id for video iframe"
Mar 28, 2024
1e8c8ee
Revert "display videos on frontend"
Mar 28, 2024
28ae94d
Revert "change object key in json response"
Mar 28, 2024
21beb9d
Revert "add setup for deployment"
Mar 28, 2024
f86295b
point to requirements dir
Apr 3, 2024
5e73d4e
remove exercises dir
Apr 3, 2024
f265a10
mv levels to requirements dir
Apr 3, 2024
0bdb759
move example response to data dir at top level
Apr 3, 2024
61ffda1
update copy in requirements
Apr 3, 2024
b58d9f4
fix grammar in 110
Apr 3, 2024
6eaa5ae
make copy more incisive
Apr 3, 2024
42e4e43
fix grammar
Apr 3, 2024
b65f0a1
add acceptance criteria
Apr 3, 2024
ff090dc
remove implementation detail
Apr 3, 2024
ff5b547
add acceptance criteria
Apr 3, 2024
0f48eb6
tweak copy
Apr 3, 2024
96af75c
add acceptance criteria
Apr 3, 2024
2877057
revamp final acceptance criteria
Apr 3, 2024
1a5cee6
add checklist points
Apr 3, 2024
29fcbb4
tweak requirements
Apr 3, 2024
67a87de
hoist acceptance criteria
Apr 3, 2024
2739ce5
fix headings
Apr 3, 2024
42115e8
highlight endpoint definition
Apr 3, 2024
aade4fd
improve copy readability
Apr 3, 2024
f2b2cbe
update link text
Apr 3, 2024
c1d2163
refer trainees to the setup steps
Apr 3, 2024
121d689
improve acceptance criteria
Apr 3, 2024
9c82f6d
further improve acceptance criteria
Apr 3, 2024
31494a7
further improve acceptance criteria
Apr 3, 2024
0d5f73c
update first set of acceptance criteria
Apr 3, 2024
657a9dc
tweak initial user stories
Apr 3, 2024
2a94dec
further tweak requirements
Apr 3, 2024
9313607
rm ref to exercises
Apr 3, 2024
90d0d87
ref to requirements instd of exercises
Apr 3, 2024
1ba5f90
ref to requirements
Apr 3, 2024
751d978
clarify you are booting up local env
Apr 3, 2024
fd15a61
tweak links
Apr 3, 2024
6e2752b
Merge branch 'main' of github.com:CodeYourFuture/Full-Stack-Project-A…
Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
node_modules/
.env
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DATABASE_URL=postgres://cyf:password@localhost:5432/cyf
TEST_DATABASE_URL=postgres://cyf:password@localhost:5432/cyf_test
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"browser": true,
"es6": true,
"node": true,
"commonjs": true,
"jest/globals": true
},
"extends": ["@codeyourfuture/standard", "prettier"],
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
},
"plugins": ["jest"],
"root": true
}
7 changes: 3 additions & 4 deletions .github/workflows/check-diff-size.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Test

on:
workflow_dispatch:
pull_request:

jobs:

check-diff:
name: Check diff size
runs-on: ubuntu-latest
Expand All @@ -20,12 +20,11 @@ jobs:
run: |
FILES_CHANGED=$(gh pr diff ${{github.event.pull_request.number}} --name-only | wc -l)
echo "Number of files changed in this PR: ${FILES_CHANGED}"
if [ $FILES_CHANGED -gt 10 ]
if [ $FILES_CHANGED -gt 20 ]
then
echo "The diff is too large. You've changed ${FILES_CHANGED} in this PR!"
exit 1
else
else
echo "The diff looks nice and small - good work! 😎"
exit 0
fi

20 changes: 20 additions & 0 deletions .github/workflows/enforce-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: enforce-linting

run-name: Enforce lint passes on committed files

on:
workflow_dispatch:
#pull_request:

jobs:
run-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: npm install
- run: npm exec prettier -- --check .
- run: npm exec eslint .
14 changes: 14 additions & 0 deletions .github/workflows/reset-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Reset Server
run-name: Reset deployed application occasionally
on:
workflow_dispatch:
#schedule:
# - cron: "*/30 * * * *"

jobs:
pingServer:
runs-on: ubuntu-latest
steps:
- run: 'curl --request POST https://<your_project_name>.netlify.app/api/videos/reset -H "Content-Type: application/json" --data "{\"code\":\"$RESET_CODE\"}" || true'
env:
RESET_CODE: ${{ secrets.RESET_CODE }}
20 changes: 20 additions & 0 deletions .github/workflows/run-client-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: run-client-tests

run-name: Enforce tests pass on committed files

on:
workflow_dispatch:
#pull_request:

jobs:
run-client-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: cp .env.example .env
- run: npm install
- run: npm run test:client
38 changes: 38 additions & 0 deletions .github/workflows/run-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: run-e2e

run-name: Enforce playwright end-to-end tests pass on committed files

on:
workflow_dispatch:
#pull_request:

jobs:
run-features:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: cyf
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: cp .env.example .env
- run: npm install
- run: npx playwright install --with-deps
- run: npm run test:e2e
env:
NODE_ENV: test
TEST_DATABASE_URL: postgres://cyf:password@localhost:5432/cyf
36 changes: 36 additions & 0 deletions .github/workflows/run-server-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: run-server-tests

run-name: Enforce tests pass on committed files

on:
workflow_dispatch:
#pull_request:

jobs:
run-server-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: cyf
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: cp .env.example .env
- run: npm install
- run: npm run test:server
env:
TEST_DATABASE_URL: postgres://cyf:password@localhost:5432/cyf
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
e2e/blob-report/
e2e/playwright/.cache/
e2e/playwright-report/
e2e/test-results/
node_modules/
server/static/
.env
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.8.0
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"useTabs": true
}
97 changes: 0 additions & 97 deletions 100.md

This file was deleted.

29 changes: 0 additions & 29 deletions 199.md

This file was deleted.

Loading
Loading