-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into ref/form-field
- Loading branch information
Showing
66 changed files
with
24,104 additions
and
14,396 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Workflow name | ||
name: "Chromatic" | ||
|
||
# Event for the workflow | ||
on: | ||
push: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
# List of jobs | ||
jobs: | ||
chromatic-deployment: | ||
# Operating System | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
# Job steps | ||
steps: | ||
- uses: actions/checkout@v1 | ||
# This extra step is not in the original chromatic workflow. | ||
# This is to use a specific version of node (14.x), because the default is 16.x, | ||
# which is not compatible with sass | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Install dependencies | ||
run: npm i | ||
# 👇 Adds Chromatic as a step in the workflow | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v1 | ||
# Chromatic GitHub Action options | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# 👇 Chromatic projectToken, refer to the manage page to obtain it. | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
onlyChanged: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: ci-e2e | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
install: | ||
# NOTE: Netlify uses ubuntu 16.08 but Github Actions does not offer it by default. | ||
# Hence, we default to the latest version. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- run: npm ci | ||
|
||
lint: | ||
needs: install | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Load Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run lint-fix | ||
- run: npm run format-fix | ||
|
||
build: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Load Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run build | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
env: | ||
CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_RECORD_KEY}} | ||
CYPRESS_BASEURL: ${{secrets.CYPRESS_BASEURL}} | ||
CYPRESS_COOKIE_NAME: ${{secrets.CYPRESS_COOKIE_NAME}} | ||
CYPRESS_COOKIE_VALUE: ${{secrets.CYPRESS_COOKIE_VALUE}} | ||
CYPRESS_TEST_REPO_NAME: ${{secrets.CYPRESS_TEST_REPO_NAME}} | ||
USERNAME: ${{secrets.USERNAME}} | ||
PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} | ||
E2E_COMMIT_HASH: ${{secrets.E2E_COMMIT_HASH}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Load Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run test:ci |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
install: | ||
# NOTE: Netlify uses ubuntu 16.08 but Github Actions does not offer it by default. | ||
# Hence, we default to the latest version. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- run: npm ci | ||
|
||
lint: | ||
needs: install | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Load Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run lint-fix | ||
- run: npm run format-fix | ||
|
||
build: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Load Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run build | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
env: | ||
CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_RECORD_KEY}} | ||
CYPRESS_BASEURL: ${{secrets.CYPRESS_BASEURL}} | ||
CYPRESS_COOKIE_NAME: ${{secrets.CYPRESS_COOKIE_NAME}} | ||
CYPRESS_COOKIE_VALUE: ${{secrets.CYPRESS_COOKIE_VALUE}} | ||
CYPRESS_TEST_REPO_NAME: ${{secrets.CYPRESS_TEST_REPO_NAME}} | ||
USERNAME: ${{secrets.USERNAME}} | ||
PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} | ||
E2E_COMMIT_HASH: ${{secrets.E2E_COMMIT_HASH}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14.x" | ||
- name: Load Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
- run: npm run test |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"storybook-preset-craco", | ||
], | ||
framework: "@storybook/react", | ||
// webpackFinal setup retrieved from ChakraUI's own Storybook setup | ||
// https://github.com/chakra-ui/chakra-ui/blob/main/.storybook/main.js | ||
webpackFinal: async (storybookConfig) => { | ||
// Required to sync aliases between storybook and overriden configs | ||
return { | ||
...storybookConfig, | ||
module: { | ||
rules: [ | ||
...storybookConfig.module.rules, | ||
{ | ||
type: "javascript/auto", | ||
test: /\.mjs$/, | ||
include: /node_modules/, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
...storybookConfig.resolve, | ||
alias: { | ||
...storybookConfig.resolve.alias, | ||
// Required so storybook knows where the npm package is to render ChakraUI components | ||
// as this is not directly installed in package.json. | ||
"@emotion/core": "@emotion/react", | ||
"emotion-theming": "@emotion/react", | ||
}, | ||
}, | ||
} | ||
}, | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.