feat: add playground for web components #4498
This file contains hidden or 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
name: Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- .github/workflows/test.yml | |
- 'packages/**' | |
- 'apps/storybook/**' | |
permissions: | |
checks: write | |
pull-requests: write | |
jobs: | |
test: | |
name: Build & test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
- uses: ./.github/actions/gh-setup | |
- name: Build | |
run: pnpm build | |
- name: Types | |
run: pnpm types:react | |
- name: Install playwright and run Storybook tests | |
run: pnpm test:storybook | |
- name: Test | |
run: pnpm test | |
- name: 'Report Coverage' | |
if: success() || failure() | |
uses: davelosert/vitest-coverage-report-action@8ab049ff5a2c6e78f78af446329379b318544a1a # v2.8.3 | |
with: | |
comment-on: none | |
- name: Publish unit test report | |
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2 | |
if: success() || failure() | |
with: | |
report_paths: 'test-report.xml' | |
detailed_summary: true | |
check_name: Unit Test Report | |
check_annotations: true | |
check_title_template: '{{FILE_NAME}} / {{TEST_NAME}}' | |
- name: Test CLI (create tokens, then build the theme) | |
run: pnpm test:cli | |
- name: Replace relative paths in test report | |
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5 # v3.0.5 | |
if: success() || failure() | |
with: | |
include: 'apps/storybook/test-report.xml' | |
find: '../../' | |
replace: '' | |
regex: false | |
- name: Publish Storybook test report | |
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2 | |
if: success() || failure() | |
with: | |
report_paths: 'apps/storybook/test-report.xml' | |
detailed_summary: true | |
check_name: Storybook Test Report | |
check_annotations: true | |
check_title_template: '{{FILE_NAME}} / {{TEST_NAME}}' |