Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 0f951ed

Browse files
committed
chore: initial commit
0 parents  commit 0f951ed

File tree

2,125 files changed

+120640
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,125 files changed

+120640
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
max_line_length = off
14+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__generated__
2+
build

.eslintrc.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
extends:
2+
- 'typescript-shareable'
3+
4+
parserOptions:
5+
project: './tsconfig.json'
6+
ecmaVersion: 2019
7+
ecmaFeatures:
8+
jsx: true
9+
10+
env:
11+
browser: true
12+
es6: true
13+
node: true
14+
'cypress/globals': true
15+
16+
settings:
17+
react:
18+
version: detect
19+
20+
plugins:
21+
- cypress
22+
23+
overrides:
24+
###
25+
# Test file overrides
26+
###
27+
- files: ['**/*.test.tsx', '**/jest/**']
28+
env:
29+
jest: true

.github/workflows/publish.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Publishes a GitHub release and NPM package for
2+
# any tag that is pushed to the repository.
3+
# Tags should be generated automatically by
4+
# manually running the "release" workflow.
5+
name: Publish
6+
7+
on:
8+
push:
9+
tags:
10+
- v*
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Setup node
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: '14'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- name: Install dependencies
24+
env:
25+
CYPRESS_INSTALL_BINARY: 0
26+
run: yarn install --immutable --immutable-cache
27+
28+
- name: Build
29+
run: yarn build:libs
30+
31+
- name: Release
32+
id: release
33+
uses: actions/create-release@v1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # provided by Actions
36+
with:
37+
tag_name: ${{ github.ref }}
38+
release_name: Release ${{ github.ref }}
39+
draft: false
40+
prerelease: false
41+
42+
- name: Upload changelog
43+
uses: actions/upload-release-asset@v1.0.1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
48+
asset_path: CHANGELOG.md
49+
asset_name: CHANGELOG.md
50+
asset_content_type: text/markdown
51+
52+
- name: Deploy NPM packages
53+
env:
54+
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
55+
run: |
56+
if [[ $GITHUB_REF =~ alpha|beta ]]; then
57+
yarn foreach --no-private npm publish --tag next
58+
else
59+
yarn foreach --no-private npm publish --tag latest
60+
fi

.github/workflows/verify.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Run linting, unit tests, check build is possible.
2+
# Standard requirements that should always be green.
3+
# Tested on NodeJS LTS and current stable.
4+
name: Verify
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
branches:
12+
- main
13+
14+
jobs:
15+
unit-tests:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node-version: ['14', '15']
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Setup node
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- name: Install dependencies
30+
run: yarn install --immutable --immutable-cache
31+
env:
32+
CYPRESS_INSTALL_BINARY: '0'
33+
34+
- name: Check commit message
35+
if: ${{ github.event_name == 'pull_request' }}
36+
run: yarn commitlint ${{ github.context.payload.before }}
37+
38+
- name: Linting & Unit testing
39+
run: |
40+
yarn build:libs
41+
git diff --exit-code
42+
yarn lint
43+
yarn test
44+
45+
- name: Archive build artifacts
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: build
49+
path: |
50+
packages/core/build
51+
packages/formik/build
52+
packages/icons/build
53+
54+
ui-tests:
55+
needs: unit-tests
56+
runs-on: ubuntu-latest
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
browser: ['chrome', 'firefox']
61+
62+
steps:
63+
- uses: actions/checkout@v2
64+
65+
- name: Setup node
66+
uses: actions/setup-node@v2
67+
68+
- name: Download all workflow run artifacts
69+
uses: actions/download-artifact@v2
70+
with:
71+
name: build
72+
path: packages/
73+
74+
- name: Run Cypress UI tests
75+
uses: cypress-io/github-action@v2
76+
with:
77+
install-command: yarn install --immutable --immutable-cache
78+
start: yarn cypress:ui-tests
79+
browser: ${{ matrix.browser }}
80+
headless: true
81+
working-directory: packages/ui-tests
82+
wait-on: 'http://localhost:9009'
83+
command-prefix: yarn workspace practical-react-components-ui-tests
84+
85+
- name: Upload screenshots for failed UI tests
86+
uses: actions/upload-artifact@v2
87+
if: failure()
88+
with:
89+
name: cypress-screenshots
90+
path: packages/ui-tests/cypress/screenshots
91+
92+
docs:
93+
needs: unit-tests
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v2
97+
98+
- name: Setup node
99+
uses: actions/setup-node@v2
100+
101+
- name: Install dependencies
102+
run: yarn install --immutable --immutable-cache
103+
env:
104+
CYPRESS_INSTALL_BINARY: '0'
105+
106+
- name: Download all workflow run artifacts
107+
uses: actions/download-artifact@v2
108+
with:
109+
name: build
110+
path: packages/
111+
112+
- name: Linting & Unit testing
113+
run: |
114+
yarn build:docs --env base="/practical-react-components/" --env prod="true"
115+
git diff --exit-code
116+
tar zcvf docs-static.tgz -C packages/docs dist

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
coverage
2+
packages/*/build
3+
packages/docs/props.json
4+
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
.eslintcache
9+
*.tsbuildinfo
10+
11+
.yarn/*
12+
!.yarn/cache
13+
!.yarn/releases
14+
!.yarn/plugins
15+
!.yarn/sdks
16+
!.yarn/versions
17+
18+
.DS_Store

0 commit comments

Comments
 (0)