-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2778e1d
Showing
19 changed files
with
15,043 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"chrome": 100, | ||
"safari": 15, | ||
"firefox": 91 | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [] | ||
} |
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,13 @@ | ||
node_modules | ||
lib/ | ||
esm/ | ||
cjs/ | ||
types/ | ||
storybook-static | ||
.idea | ||
|
||
.nyc_output | ||
coverage | ||
cypress/videos | ||
cypress/screenshots | ||
cypress/**/__image_snapshots__/* |
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,27 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"plugins": ["jest"], | ||
"env": { | ||
"jest/globals": true | ||
}, | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": {} | ||
} |
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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
target-branch: "dev" | ||
open-pull-requests-limit: 20 | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "dependencies" |
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,140 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
pull_request: | ||
branches: [ master, dev ] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
git_source_branch: ${{ steps.variables.outputs.git_source_branch }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 100 | ||
- name: Define variables | ||
id: variables | ||
shell: bash | ||
run: | | ||
GIT_SOURCE_BRANCH=`([ "${GITHUB_HEAD_REF}" != "" ] && echo "${GITHUB_HEAD_REF}" || echo "${GITHUB_REF}") | sed 's/refs\/heads\///g'` | ||
echo "git_source_branch=$GIT_SOURCE_BRANCH" >> $GITHUB_OUTPUT | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [ setup ] | ||
|
||
strategy: | ||
matrix: | ||
node-version: [ 20 ] | ||
|
||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test | ||
|
||
- name: Find diffs | ||
if: failure() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) | ||
id: snapshots_diffs | ||
shell: bash | ||
run: | | ||
echo "found=$(find . -iname '*.diff.png' | wc -l)" >> $GITHUB_OUTPUT | ||
- name: update snapshots | ||
if: ${{ always() && steps.snapshots_diffs.outputs.found > 0 }} | ||
run: npm run test:cypress:ci:update | ||
- name: Create Pull Request | ||
id: update_snapshots | ||
if: always() && steps.snapshots_diffs.outputs.found > 0 && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) | ||
env: | ||
HASH: ${{ format('#{0}', github.event.number) }} | ||
BRANCH: ${{ needs.setup.outputs.git_source_branch }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
base: ${{ env.BRANCH }} | ||
branch: snapshots-patch/${{ env.BRANCH }} | ||
title: Update Cypress snapshots in ${{ env.BRANCH }} | ||
commit-message: Updated snapshots | ||
body: Updated snapshots in ${{ github.event_name == 'pull_request' && env.HASH || env.BRANCH}} | ||
uses: peter-evans/create-pull-request@v4 | ||
- name: Comment PR | ||
if: ${{ always() && github.event_name == 'pull_request' && steps.update_snapshots.outputs.pull-request-number }} | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
message: '${{ steps.update_snapshots.outputs.pull-request-operation }}: #${{ steps.update_snapshots.outputs.pull-request-number }}' | ||
|
||
- uses: codecov/codecov-action@v3 | ||
- name: Store test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-results | ||
path: | | ||
cypress/**/__image_snapshots__/**/*.diff.* | ||
cypress/**/__image_snapshots__/**/*.actual.* | ||
cypress/screenshots/ | ||
cypress/videos/ | ||
if-no-files-found: ignore | ||
|
||
release: | ||
name: Release | ||
needs: [ "build" ] | ||
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm run build | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release | ||
|
||
# docs: | ||
# runs-on: ubuntu-latest | ||
# needs: [ "build", "release" ] | ||
# if: ${{ github.ref == 'refs/heads/master' }} | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 20 | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: | | ||
# **/node_modules | ||
# key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
# - run: npm ci | ||
# - run: npm run deploy-storybook -- --ci --host-token-env-variable=GITHUB_TOKEN | ||
# env: | ||
# GITHUB_TOKEN: JulianWielga:${{ secrets.GITHUB_TOKEN }} |
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,13 @@ | ||
node_modules | ||
cjs | ||
esm | ||
storybook-static | ||
.idea | ||
*.iml | ||
*.tgz | ||
|
||
.nyc_output | ||
coverage | ||
cypress/videos | ||
cypress/screenshots | ||
.DS_Store |
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 @@ | ||
save-exact=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 @@ | ||
v18.12.1 |
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,16 @@ | ||
{ | ||
"report-dir": "coverage/cypress", | ||
"reporter": [ | ||
"text", | ||
"json", | ||
"lcov" | ||
], | ||
"all": true, | ||
"include": [ | ||
"src/**/*.{js,jsx,ts,tsx}" | ||
], | ||
"exclude": [ | ||
"**/*.{stories,test,spec}.{js,jsx,ts,tsx}", | ||
"**/{stories,test,spec}.{js,jsx,ts,tsx}" | ||
] | ||
} |
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,5 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "all", | ||
"printWidth": 140 | ||
} |
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,34 @@ | ||
{ | ||
"branches": [ | ||
"master", | ||
{"name": "dev", "prerelease": "beta"} | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"releaseRules": [ | ||
{ | ||
"scope": "deps", | ||
"release": "patch" | ||
} | ||
] | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"tarballDir": "release" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": "release/*.tgz" | ||
} | ||
], | ||
"@semantic-release/git" | ||
] | ||
} |
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,13 @@ | ||
{ | ||
"source": ["package.json"], | ||
"dependencyTypes": ["prod", "dev", "local"], | ||
"semverGroups": [ | ||
{ | ||
"label": "use exact version numbers in production and dev", | ||
"dependencyTypes": ["prod", "dev"], | ||
"range": "" | ||
} | ||
], | ||
"indent": " ", | ||
"sortAz": ["bin", "contributors", "dependencies", "devDependencies", "keywords", "peerDependencies", "resolutions"] | ||
} |
Oops, something went wrong.