Skip to content

[Related #112] UI updates and fixes #412

[Related #112] UI updates and fixes

[Related #112] UI updates and fixes #412

Workflow file for this run

name: onPR
on:
pull_request:
branches: '**'
jobs:
build:
name: Building and Testing
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.19.0 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
storybookBaseDir: dist/storybook/client
autoAcceptChanges: main
- if: steps.chromatic.outputs.buildUrl != 'undefined'
name: Publish Summary
run: |
echo "${{steps.chromatic.outputs.buildUrl}}" >> $GITHUB_STEP_SUMMARY
- if: steps.chromatic.outputs.buildUrl != 'undefined'
name: Find chromatic comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Chromatic build output
- if: steps.chromatic.outputs.buildUrl != 'undefined'
name: Create chromatic comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Chromatic build output
| Name | Link |
| --- | --- |
| Build Results | ${{steps.chromatic.outputs.buildUrl}} |
| Storybook Preview | ${{steps.chromatic.outputs.storybookUrl}} |
| Component Count | ${{steps.chromatic.outputs.componentCount}} |
edit-mode: replace
- run: npm run build
- run: npm run test
- run: npm run make-badges:ci
- run: npm run coverage:codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: coverage