File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # =======================================================================
2+ # E2E Website Tests Workflow
3+ # =======================================================================
4+ #
5+ # This workflow runs end-to-end tests for the console-table-printer website
6+ # using Playwright.
7+ #
8+ # It performs:
9+ # - Website navigation tests
10+ # - Content verification tests
11+ # - Documentation page tests
12+ #
13+ # The workflow runs:
14+ # - Hourly (via cron)
15+ # - On push to main branch
16+ # - Manually via workflow_dispatch
17+ #
18+ # Test results are uploaded as artifacts and stored for 7 days.
19+ # =======================================================================
20+
21+ name : E2E Website Tests
22+
23+ on :
24+ schedule :
25+ # Run every hour
26+ - cron : ' 0 * * * *'
27+ # Also run on push to main branch
28+ push :
29+ branches : [ main ]
30+ # Allow manual triggering
31+ workflow_dispatch :
32+
33+ jobs :
34+ e2e-tests :
35+ name : E2E Website Tests
36+ runs-on : ubuntu-latest
37+
38+ steps :
39+ - name : Checkout code
40+ uses : actions/checkout@v4
41+
42+ - name : Setup Node.js
43+ uses : actions/setup-node@v4
44+ with :
45+ node-version : ' 20'
46+ cache : ' yarn'
47+
48+ - name : Install dependencies
49+ run : yarn install
50+
51+ - name : Install Playwright browsers
52+ run : npx playwright install --with-deps chromium
53+
54+ - name : Run E2E tests
55+ run : yarn test:e2e || true # Continue even if E2E tests fail (website might change)
56+
57+ - name : Upload test results
58+ if : always()
59+ uses : actions/upload-artifact@v4
60+ with :
61+ name : e2e-test-results
62+ path : |
63+ playwright-report/
64+ test-results/
65+ retention-days : 7
Original file line number Diff line number Diff line change 11# =======================================================================
2- # Hourly Tests Workflow
2+ # Unit Tests Workflow
33# =======================================================================
44#
5- # This workflow runs tests for the console-table-printer and simple-wcswidth
5+ # This workflow runs unit tests for the console-table-printer and simple-wcswidth
66# packages on multiple Node.js versions (18.x, 20.x, 22.x, 24.x).
77#
88# It performs:
99# - Unit tests on all supported Node.js versions
10- # - E2E tests for the website using Playwright
1110#
1211# The workflow runs:
1312# - Hourly (via cron)
1413# - On push to main branch
1514# - Manually via workflow_dispatch
1615#
17- # Test results are uploaded as artifacts and stored for 7 days.
1816# =======================================================================
1917
20- name : Hourly Tests
18+ name : Unit Tests
2119
2220on :
2321 schedule :
5149 run : yarn install
5250
5351 - name : Run unit tests
54- run : yarn test:unit
55-
56- e2e-tests :
57- name : E2E Tests
58- runs-on : ubuntu-latest
59- needs : unit-tests
60-
61- steps :
62- - name : Checkout code
63- uses : actions/checkout@v4
64-
65- - name : Setup Node.js
66- uses : actions/setup-node@v4
67- with :
68- node-version : ' 20'
69- cache : ' yarn'
70-
71- - name : Install dependencies
72- run : yarn install
73-
74- - name : Install Playwright browsers
75- run : npx playwright install --with-deps chromium
76-
77- - name : Run E2E tests
78- run : yarn test:e2e || true # Continue even if E2E tests fail (website might change)
79-
80- - name : Upload test results
81- if : always()
82- uses : actions/upload-artifact@v4
83- with :
84- name : test-results
85- path : |
86- playwright-report/
87- test-results/
88- retention-days : 7
52+ run : yarn test:unit
You can’t perform that action at this time.
0 commit comments