Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Enable Chromatic #216

Merged
merged 1 commit into from Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -18,17 +18,20 @@ jobs:
# Specify names so that the GitHub branch protection settings for
# required checks don't need to change if we ever change the commands used.
- name: lint
command: lint:nofix
command: yarn run lint:nofix
- name: test
command: test --maxWorkers=100%
command: yarn run test --maxWorkers=100%
- name: storybook
command: storybook:ci
command: yarn run storybook:ci
- name: chromatic
command: yarn workspace @foxglove-studio/app run chromatic

name: ${{ matrix.config.name }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Configure Node.js
uses: actions/setup-node@v2.1.5
Expand All @@ -50,8 +53,11 @@ jobs:
service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
export_default_credentials: true
- run: yarn install --immutable
- run: yarn run ${{ matrix.config.command }}
- run: ${{ matrix.config.command }}
env:
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
REG_SUIT_GITHUB_CLIENT_ID: ${{ secrets.REG_SUIT_GITHUB_CLIENT_ID }}
REG_SUIT_HEAD_SHA: ${{ github.sha }}
# `base.sha` works for pull request events, `before` works for pushes to main
Expand Down
3 changes: 3 additions & 0 deletions app/package.json
Expand Up @@ -2,6 +2,8 @@
"name": "@foxglove-studio/app",
"private": true,
"scripts": {
"chromatic": "chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name storybook:build --exit-once-uploaded",
"storybook:build": "build-storybook",
"test": "NODE_OPTIONS='-r ts-node/register' jest",
"test:watch": "NODE_OPTIONS='-r ts-node/register' jest --watch"
},
Expand Down Expand Up @@ -132,6 +134,7 @@
"@types/ws": "7.4.0",
"@wojtekmaj/enzyme-adapter-react-17": "0.4.1",
"argparse": "2.0.1",
"chromatic": "github:amacneil/chromatic-cli#detectyarn",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"dom-to-image-more-scroll-fix": "2.9.0",
"enzyme": "3.11.0",
"fetch-mock": "9.11.0",
Expand Down