Skip to content

Commit 43194d8

Browse files
feat(testing): add test suite and fix ui bugs (#7)
1 parent 4a31fd1 commit 43194d8

54 files changed

Lines changed: 2971 additions & 457 deletions

Some content is hidden

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

.github/workflows/deploy.yml

Lines changed: 53 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,62 @@
11
name: deploy to github pages
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
77

88
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
9+
contents: read
10+
pages: write
11+
id-token: write
1212

1313
concurrency:
14-
group: "pages"
15-
cancel-in-progress: false
14+
group: 'pages'
15+
cancel-in-progress: false
1616

1717
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: checkout code
22-
uses: actions/checkout@v6
23-
24-
- name: setup node
25-
uses: actions/setup-node@v6
26-
with:
27-
node-version: "lts/*"
28-
cache: "npm"
29-
30-
- name: install dependencies
31-
run: npm ci
32-
33-
- name: Run Lint
34-
run: npm run lint
35-
36-
- name: build project
37-
run: npm run build
38-
39-
- name: setup pages
40-
uses: actions/configure-pages@v5
41-
42-
- name: upload artifact
43-
uses: actions/upload-pages-artifact@v4
44-
with:
45-
path: "./dist"
46-
47-
deploy:
48-
environment:
49-
name: github-pages
50-
url: ${{ steps.deployment.outputs.page_url }}
51-
runs-on: ubuntu-latest
52-
needs: build
53-
steps:
54-
- name: deploy to github pages
55-
id: deployment
56-
uses: actions/deploy-pages@v4
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: checkout code
22+
uses: actions/checkout@v6
23+
24+
- name: setup node
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: 'lts/*'
28+
cache: 'npm'
29+
30+
- name: install dependencies
31+
run: npm ci
32+
33+
- name: check formatting
34+
run: npm run format:check
35+
36+
- name: run lint
37+
run: npm run lint
38+
39+
- name: run tests
40+
run: npm test -- --run
41+
42+
- name: build project
43+
run: npm run build
44+
45+
- name: setup pages
46+
uses: actions/configure-pages@v5
47+
48+
- name: upload artifact
49+
uses: actions/upload-pages-artifact@v4
50+
with:
51+
path: './dist'
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: deploy to github pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

.github/workflows/pr-validation.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
concurrency:
9-
group: "pr-${{ github.event.pull_request.number }}"
9+
group: 'pr-${{ github.event.pull_request.number }}'
1010
cancel-in-progress: true
1111

1212
jobs:
@@ -19,14 +19,20 @@ jobs:
1919
- name: setup node
2020
uses: actions/setup-node@v6
2121
with:
22-
node-version: "lts/*"
23-
cache: "npm"
22+
node-version: 'lts/*'
23+
cache: 'npm'
2424

2525
- name: install dependencies
2626
run: npm ci
2727

28+
- name: check formatting
29+
run: npm run format:check
30+
2831
- name: run lint
2932
run: npm run lint
3033

34+
- name: run tests
35+
run: npm test -- --run
36+
3137
- name: build project
3238
run: npm run build

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
coverage

.prettierignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp.js
4+
5+
# Build outputs
6+
dist/
7+
build/
8+
coverage/
9+
*.tsbuildinfo
10+
11+
# Package manager files
12+
package-lock.json
13+
yarn.lock
14+
pnpm-lock.yaml
15+
.yarn/
16+
.pnpm-store/
17+
18+
# Version control
19+
.git/
20+
.gitattributes
21+
22+
# IDE
23+
.vscode/
24+
.idea/
25+
*.sublime-project
26+
*.sublime-workspace
27+
28+
# OS
29+
.DS_Store
30+
Thumbs.db
31+
32+
# Logs
33+
*.log
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
lerna-debug.log*
38+
39+
# Temporary files
40+
*.tmp
41+
*.temp
42+
.cache/
43+
44+
# Generated files
45+
*.min.js
46+
*.min.css
47+
48+
# Test coverage
49+
coverage/
50+
.nyc_output/
51+
52+
# Environment
53+
.env
54+
.env.local
55+
.env.*.local
56+

.prettierrc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": true,
4+
"trailingComma": "all",
5+
"singleQuote": false,
6+
"printWidth": 80,
7+
"tabWidth": 2,
8+
"useTabs": false,
9+
"arrowParens": "always",
10+
"endOfLine": "lf",
11+
"bracketSpacing": true,
12+
"bracketSameLine": false,
13+
"jsxSingleQuote": false,
14+
"quoteProps": "as-needed",
15+
"proseWrap": "preserve",
16+
"htmlWhitespaceSensitivity": "css",
17+
"embeddedLanguageFormatting": "auto",
18+
"singleAttributePerLine": false,
19+
"overrides": [
20+
{
21+
"files": ["*.json", "*.jsonc"],
22+
"options": {
23+
"printWidth": 100,
24+
"trailingComma": "none"
25+
}
26+
},
27+
{
28+
"files": ["*.md", "*.mdx"],
29+
"options": {
30+
"proseWrap": "always",
31+
"printWidth": 80
32+
}
33+
},
34+
{
35+
"files": ["*.yml", "*.yaml"],
36+
"options": {
37+
"tabWidth": 4,
38+
"singleQuote": true
39+
}
40+
}
41+
]
42+
}

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# CagesThrottleUs Portfolio
22

3-
This repo will be used to show my live resume as well as blogs for the different projects I've worked on.
3+
This repo will be used to show my live resume as well as blogs for the different
4+
projects I've worked on.
45

56
This will include both code and non-code projects - for life.
67

7-
Visit the [website](https://cagesthrottleus.github.io/).
8+
Visit the [website](https://cagesthrottleus.github.io/).

eslint.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default [
4949
rules: {
5050
// React Hooks rules
5151
...reactHooks.configs.recommended.rules,
52-
52+
5353
// React Refresh rules
5454
"react-refresh/only-export-components": [
5555
"warn",
@@ -74,7 +74,10 @@ export default [
7474
"react/react-in-jsx-scope": "off", // Not needed in React 17+
7575
"react/require-render-return": "error",
7676
"react/self-closing-comp": "warn",
77-
"react/jsx-curly-brace-presence": ["warn", { props: "never", children: "never" }],
77+
"react/jsx-curly-brace-presence": [
78+
"warn",
79+
{ props: "never", children: "never" },
80+
],
7881
"react/jsx-boolean-value": ["warn", "never"],
7982

8083
// Accessibility rules (WCAG standards)

index.html

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,48 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
6+
77
<!-- Performance: DNS Prefetch & Preconnect -->
88
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin />
99
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10-
10+
1111
<!-- Fonts: Strategic typography system with serif, sans-serif, and mono -->
1212
<link
1313
href="https://fonts.googleapis.com/css2?family=Bitcount+Single+Ink:slnt,wght,CRSV,ELSH,ELXP,SZP1,SZP2,XPN1,YPN1@-2,100..900,1,59.2,21,44,29,19,-21&family=Crimson+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
1414
rel="stylesheet"
1515
/>
16-
16+
1717
<!-- Favicon -->
1818
<link
1919
rel="icon"
2020
type="image/svg+xml"
2121
href="/public/github-mark-white.svg"
2222
/>
23-
23+
2424
<!-- Meta Tags for SEO & Social Sharing -->
25-
<meta name="description" content="CagesThrottleUs - Software Engineer Portfolio. B.E. in Computer Science from BITS Pilani. Explore my professional journey and technical achievements." />
26-
<meta name="keywords" content="software engineer, portfolio, computer science, BITS Pilani, web development, react" />
25+
<meta
26+
name="description"
27+
content="CagesThrottleUs - Software Engineer Portfolio. B.E. in Computer Science from BITS Pilani. Explore my professional journey and technical achievements."
28+
/>
29+
<meta
30+
name="keywords"
31+
content="software engineer, portfolio, computer science, BITS Pilani, web development, react"
32+
/>
2733
<meta name="author" content="CagesThrottleUs" />
28-
34+
2935
<!-- Open Graph / Social Media -->
3036
<meta property="og:type" content="website" />
3137
<meta property="og:title" content="CagesThrottleUs | Portfolio" />
32-
<meta property="og:description" content="Software Engineer Portfolio - Explore my professional journey and technical achievements" />
33-
38+
<meta
39+
property="og:description"
40+
content="Software Engineer Portfolio - Explore my professional journey and technical achievements"
41+
/>
42+
3443
<!-- Theme Color -->
3544
<meta name="theme-color" content="#8B5CF6" />
36-
45+
3746
<title>CagesThrottleUs | Portfolio</title>
3847
</head>
3948
<body>

0 commit comments

Comments
 (0)