Skip to content

Commit

Permalink
vercel push added
Browse files Browse the repository at this point in the history
  • Loading branch information
datguychen committed Oct 15, 2023
1 parent fa81f6f commit 694f88f
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 67 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/CronWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ jobs:

- name: Install dependencies
run: npm ci
- name: Install Testmo CLI
run: npm install --no-save @testmo/testmo-cli
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Run Playwright - All tests
run: npx playwright test
- name: Run core tests
run: npx playwright test --grep "@core" --project="Chrome"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/PushWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ jobs:

- name: Install dependencies
run: npm ci
- name: Install Testmo CLI
run: npm install --no-save @testmo/testmo-cli
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Run Playwright - All tests
run: npx playwright test
- name: Install Vercel CLI
run: pnpm i -g vercel
- name: Run vercel tests
run: npx playwright test --grep "@vercel" --project="Chrome"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report
retention-days: 5
retention-days: 5
- name: Build and Deploy to Vercel
if: success()
run: |
npm run build
npx vercel --prod
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Add your Vercel token as a secret in your repository

81 changes: 52 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
]
},
"devDependencies": {
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.39.0",
"@types/node": "^20.8.6",
"tailwindcss": "^3.3.2"
}
}
10 changes: 5 additions & 5 deletions tests/1_Sidebar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function delay(time: number) {
});
}

test('Sidebar_ProfilePicture @core', async ({browser})=>
test('Sidebar_ProfilePicture @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down Expand Up @@ -37,7 +37,7 @@ test('Sidebar_ProfilePicture @core', async ({browser})=>
await page.close();
});

test('Sidebar_FullName @core', async ({browser})=>
test('Sidebar_FullName @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down Expand Up @@ -66,7 +66,7 @@ test('Sidebar_FullName @core', async ({browser})=>
await page.close();
});

test('Sidebar_Tabs_HoverStates @core', async ({browser})=>
test('Sidebar_Tabs_HoverStates @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down Expand Up @@ -120,7 +120,7 @@ test('Sidebar_Tabs_HoverStates @core', async ({browser})=>
await page.close();
});

test('Sidebar_Tabs_Click_Check @core', async ({browser})=>
test('Sidebar_Tabs_Click_Check @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down Expand Up @@ -168,7 +168,7 @@ test('Sidebar_Tabs_Click_Check @core', async ({browser})=>
await page.close();
});

test('Sidebar_Github_LinkedIn_Buttons @core', async ({browser})=>
test('Sidebar_Github_LinkedIn_Buttons @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down
2 changes: 1 addition & 1 deletion tests/2_Home.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function delay(time: number) {
});
}

test('Home_Text_Visibility @core', async ({browser})=>
test('Home_Text_Visibility @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down
2 changes: 1 addition & 1 deletion tests/4_Resume.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function delay(time: number) {
});
}

test('Resume_General_Sections_Visibility @core', async ({browser})=>
test('Resume_General_Sections_Visibility @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down
2 changes: 1 addition & 1 deletion tests/5_Projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function delay(time: number) {
});
}

test('Projects_General_Sections_Visibility @core', async ({browser})=>
test('Projects_General_Sections_Visibility @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down
4 changes: 2 additions & 2 deletions tests/6_Contact.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function delay(time: number) {
});
}

test('Contact_General_Sections_Visibility @core', async ({browser})=>
test('Contact_General_Sections_Visibility @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down Expand Up @@ -39,7 +39,7 @@ test('Contact_General_Sections_Visibility @core', async ({browser})=>
await page.close();
});

test('Contact_GitHub_LinkedIn @core', async ({browser})=>
test('Contact_GitHub_LinkedIn @core @vercel', async ({browser})=>

{
test.info().annotations.push({type: "severity", description: "Critical"});
Expand Down
18 changes: 0 additions & 18 deletions tests/example.spec.ts

This file was deleted.

0 comments on commit 694f88f

Please sign in to comment.