Skip to content

Commit

Permalink
feat: move back to Vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten committed Dec 28, 2023
1 parent 44429cc commit d1ca3ba
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 57 deletions.
53 changes: 29 additions & 24 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
key: macos-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }}

- name: Run Tests
run: yarn test ./src/macOsVoiceOver.spec.ts --config macos.config.ts --shard ${{ matrix.shardIndex }}/2000
run: yarn test ./src/macOsVoiceOver.spec.ts --config macos.config.ts --shard ${{ matrix.shardIndex }}/5000
continue-on-error: true

- name: Upload Playwright Artifacts
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
key: windows-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }}

- name: Run Tests
run: yarn test ./src/windowsNvda.spec.ts --config windows.config.ts --shard ${{ matrix.shardIndex }}/2000
run: yarn test ./src/windowsNvda.spec.ts --config windows.config.ts --shard ${{ matrix.shardIndex }}/5000
continue-on-error: true

- name: Upload Playwright Artifacts
Expand All @@ -249,9 +249,6 @@ jobs:
if: always()
needs: [test-voiceover-preview, test-nvda-preview]
runs-on: ubuntu-latest
environment:
name: aria-at-tests-preview-report
url: ${{ steps.deploy-pages.outputs.page_url }}
steps:
- name: Clear Space
run: |
Expand Down Expand Up @@ -282,6 +279,14 @@ jobs:
with:
node-version: 20

- name: Update Deployment Status - Start
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
env: aria-at-tests-preview-report
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v4
with:
pattern: playwright-report-*
Expand All @@ -301,24 +306,24 @@ jobs:
- name: Cleanup Downloads
run: rm -rf ./playwright-report || true

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload HTML Report
uses: actions/upload-pages-artifact@v3
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
path: html-report

- name: Deploy to GitHub Pages
id: deploy-pages
uses: actions/deploy-pages@v4

- name: PR Comment
if: ${{ always() && github.event_name == 'pull_request' }}
uses: thollander/actions-comment-pull-request@v2
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-comment: true
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: html-report

- name: Update Deployment Status - Finish
uses: bobheadxi/deployments@v1
if: always()
with:
message: |
Playwright Test Report: ${{steps.deploy-pages.outputs.page_url}}
comment_tag: "Playwright Test Report"
pr_number: ${{ inputs.pr_number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env: ${{ steps.deployment.outputs.env }}
env_url: ${{ steps.vercel-action.outputs.preview-url }}
44 changes: 30 additions & 14 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
key: macos-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }}

- name: Run Tests
run: yarn test ./src/macOsVoiceOver.spec.ts --config macos.config.ts --shard ${{ matrix.shardIndex }}/10
run: yarn test ./src/macOsVoiceOver.spec.ts --config macos.config.ts --shard ${{ matrix.shardIndex }}/20
continue-on-error: true

- name: Upload Playwright Artifacts
Expand Down Expand Up @@ -271,9 +271,6 @@ jobs:
if: always()
needs: [test-voiceover, test-nvda]
runs-on: ubuntu-latest
environment:
name: aria-at-tests-report
url: ${{ steps.deploy-pages.outputs.page_url }}
steps:
- name: Clear Space
run: |
Expand Down Expand Up @@ -304,6 +301,14 @@ jobs:
with:
node-version: 20

- name: Update Deployment Status - Start
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
env: aria-at-tests-report
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v4
with:
pattern: playwright-report-*
Expand All @@ -323,14 +328,25 @@ jobs:
- name: Cleanup Downloads
run: rm -rf ./playwright-report || true

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload HTML Report
uses: actions/upload-pages-artifact@v3
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
path: html-report

- name: Deploy to GitHub Pages
id: deploy-pages
uses: actions/deploy-pages@v4
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-comment: false
vercel-args: "--prod"
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: html-report

- name: Update Deployment Status - Finish
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env: ${{ steps.deployment.outputs.env }}
env_url: ${{ steps.vercel-action.outputs.preview-url }}
17 changes: 8 additions & 9 deletions macos.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ const config: PlaywrightTestConfig = {
name: "webkit",
use: { ...devices["Desktop Safari"], headless: false },
},
// TODO: Enable once figure out storage size situation.
// {
// name: "firefox",
// use: { ...devices["Desktop Firefox"], headless: false },
// },
// {
// name: "chromium",
// use: { ...devices["Desktop Chrome"], headless: false },
// },
{
name: "firefox",
use: { ...devices["Desktop Firefox"], headless: false },
},
{
name: "chromium",
use: { ...devices["Desktop Chrome"], headless: false },
},
],
reporter: process.env.CI ? [["github"], ["html", { open: "never" }]] : "list",
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test:report": "ts-node src/report.ts"
},
"dependencies": {
"@guidepup/guidepup": "^0.21.0",
"@guidepup/guidepup": "^0.21.1",
"@guidepup/playwright": "^0.12.0",
"@playwright/test": "^1.40.1",
"csvtojson": "^2.0.10",
Expand Down
9 changes: 4 additions & 5 deletions windows.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ const config: PlaywrightTestConfig = {
name: "chromium",
use: { ...devices["Desktop Chrome"], headless: false },
},
// TODO: Enable once figure out storage size situation.
// {
// name: "firefox",
// use: { ...devices["Desktop Firefox"], headless: false },
// },
{
name: "firefox",
use: { ...devices["Desktop Firefox"], headless: false },
},
],
reporter: process.env.CI ? [["github"], ["html", { open: "never" }]] : "list",
};
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b"
integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==

"@guidepup/guidepup@^0.21.0":
version "0.21.0"
resolved "https://registry.yarnpkg.com/@guidepup/guidepup/-/guidepup-0.21.0.tgz#bccf8bd7c5a08b4f8b70578eba1a8f835bdb8e5d"
integrity sha512-gO7c2rT2nG/VgAhMlk7FmEbU4HI8DoS8FYsohAcCVWaCHZM/I6vUh4FLTHMZ3p+ZTtHubNwqprxAHmzQoxM3Cg==
"@guidepup/guidepup@^0.21.1":
version "0.21.1"
resolved "https://registry.yarnpkg.com/@guidepup/guidepup/-/guidepup-0.21.1.tgz#d432617aeb97dccd46f922c0ed819fe165e09a7f"
integrity sha512-AuyiCQ5302OEggldIUj/SIyOdtLxedPjoP9rNY2c9azylqXA235Aki5vOLzmRuQWnLcwEuX7oaddkF1y82gnYA==
dependencies:
ffmpeg-static "^5.2.0"
regedit "5.1.2"
Expand Down

0 comments on commit d1ca3ba

Please sign in to comment.