Skip to content

Commit

Permalink
Publish test report to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkafton committed Feb 7, 2024
1 parent 31c28a0 commit 3fa600e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/e2e-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: yarn install --immutable

- name: Build frontend
run: MITOPEN_HOSTNAME=nginx:8063 yarn build
run: MITOPEN_HOSTNAME=localhost:8063 yarn build

- name: Build services
run: docker compose -f docker-compose-e2e-tests.yml build
Expand All @@ -33,5 +33,23 @@ jobs:
- name: Install Playwright Browsers
run: yarn --cwd e2e_testing playwright install --with-deps

- name: Curl home page (debug)
run: curl -v http://localhost:8063

- name: Run E2E tests
run: BASE_URL=localhost:8063 CI=true yarn --cwd e2e_testing test

- name: Setup Pages
if: always()
uses: actions/configure-pages@v3

- name: Upload artifact
if: always()
uses: actions/upload-pages-artifact@v2
with:
path: e2e_testing/playwright-report

- name: Deploy to GitHub Pages
if: always()
id: deployment
uses: actions/deploy-pages@v2
16 changes: 8 additions & 8 deletions e2e_testing/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export default defineConfig({
use: { ...devices["Desktop Chrome"] },
},

{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
// {
// name: "firefox",
// use: { ...devices["Desktop Firefox"] },
// },

{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
// {
// name: "webkit",
// use: { ...devices["Desktop Safari"] },
// },

/* Test against mobile viewports. */
// {
Expand Down
8 changes: 8 additions & 0 deletions frontends/github-pages/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ const routes: RouteObject[] = [
</h3>
MIT Open Learning's React component library, presented with{" "}
<a href="https://storybook.js.org/">Storybook</a>.
<h3>
<a href={`${PUBLIC_URL}/playwright-report`}>
E2E Test Report
</a>
</h3>
The report from the most recent{" "}
<a href="https://playwright.dev/">Playwright</a> E2E testing
run.
</Links>
</Grid>
</Page>
Expand Down

0 comments on commit 3fa600e

Please sign in to comment.