-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from muriukialex/chore/add-tests
Chore: Introduce Loading Skeletons, GitHub Workflow & Cypress Tests
- Loading branch information
Showing
38 changed files
with
3,481 additions
and
148 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,60 @@ | ||
name: AWS R/Start Labs Preview Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
Format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.17.0 | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Code Format | ||
run: npm run format | ||
|
||
Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.17.0 | ||
- name: Clear npm cache | ||
run: npm cache clean -f | ||
- name: Delete node_modules and package-lock.json | ||
run: | | ||
rm -rf node_modules | ||
rm package-lock.json | ||
# - name: Install Dependencies | ||
# run: npm install | ||
# - name: Cypress e2e tests 🧪 | ||
# uses: cypress-io/[email protected] | ||
# with: | ||
# start: npm run dev | ||
# wait-on: "http://localhost:3000" | ||
# browser: electron | ||
# config-file: cypress.config.ts | ||
|
||
Deploy-Preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |
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,60 @@ | ||
name: AWS R/Start Labs Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
Format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.17.0 | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Code Format | ||
run: npm run format | ||
|
||
Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.17.0 | ||
- name: Clear npm cache | ||
run: npm cache clean -f | ||
- name: Delete node_modules and package-lock.json | ||
run: | | ||
rm -rf node_modules | ||
rm package-lock.json | ||
# - name: Install Dependencies | ||
# run: npm install | ||
# - name: Cypress e2e tests 🧪 | ||
# uses: cypress-io/[email protected] | ||
# with: | ||
# start: npm run dev | ||
# wait-on: "http://localhost:3000" | ||
# browser: electron | ||
# config-file: cypress.config.ts | ||
|
||
Deploy-Production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
*.env*.json | ||
|
||
# vercel | ||
.vercel | ||
|
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,11 @@ | ||
{ | ||
"plugins": [ | ||
"prettier-plugin-organize-imports", | ||
"prettier-plugin-tailwindcss" | ||
], | ||
"trailingComma": "all", | ||
"semi": false, | ||
"singleQuote": false, | ||
"useTabs": false, | ||
"tabWidth": 2 | ||
} |
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const Divider = () => { | ||
return <hr className="dark:bg-gray-500 bg-white" /> | ||
return <hr className="bg-white dark:bg-gray-500" /> | ||
} | ||
|
||
export default Divider |
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,19 @@ | ||
const LoadingLabs = () => { | ||
const loadingItems = Array.from({ length: 20 }, () => 1) | ||
return ( | ||
<div className="flex animate-pulse"> | ||
<div className="mt-2 w-full"> | ||
<ul className="mt-5 space-y-3"> | ||
{loadingItems.map((_, idx) => ( | ||
<li | ||
key={idx} | ||
className="h-10 w-full rounded bg-gray-200 dark:bg-gray-700" | ||
></li> | ||
))} | ||
</ul> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default LoadingLabs |
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,12 @@ | ||
import { appTitle } from "@/lib/const" | ||
import Image from "next/image" | ||
|
||
const LoadingLogo = () =>{ | ||
return ( | ||
<div className="h-screen flex items-center justify-center animate-bounce"> | ||
<Image alt={appTitle} src="/aws-restart-logo.png" width={120} height={50} /> | ||
</div> | ||
) | ||
} | ||
|
||
export default LoadingLogo |
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,4 @@ | ||
import LoadingLabs from "./LoadingLabs" | ||
import LoadingLogo from "./LoadingLogo" | ||
|
||
export { LoadingLabs, LoadingLogo } |
Oops, something went wrong.