-
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
GoldWolf
committed
Sep 21, 2023
0 parents
commit a199511
Showing
3,333 changed files
with
351,085 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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,4 @@ | ||
COMPOSE_PROJECT_NAME=pioneer-joystream-node | ||
COMPOSE_FILE=packages/ui/dev/helpers/chain-spec/docker-compose.yml | ||
|
||
RUNTIME=8cd66addcd7a2f1f107d106c96f07a290e1a73e3 |
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,86 @@ | ||
{ | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"jest": true, | ||
"browser": true | ||
}, | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"eslint:recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:import/typescript" | ||
], | ||
"plugins": ["import", "react-hooks"], | ||
"ignorePatterns": [".eslintrc.js"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
"globals": { | ||
"GIT_VERSION": true, | ||
"IS_DEVELOPMENT": true | ||
}, | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"no-console": "error", | ||
"no-redeclare": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unnecessary-type-constraint": "off", | ||
"quotes": [ | ||
"error", | ||
"single", | ||
{ | ||
"avoidEscape": true | ||
} | ||
], | ||
"import/no-unresolved": "off", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": ["builtin", "external", "parent", ["index", "sibling"]], | ||
"pathGroups": [ | ||
{ "pattern": "@test/**", "position": "after", "group": "builtin" }, | ||
{ "pattern": "@/**", "position": "after", "group": "external" } | ||
], | ||
"pathGroupsExcludedImportTypes": ["builtin"], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"import/no-useless-path-segments": [ | ||
"error", | ||
{ | ||
"noUselessIndex": true | ||
} | ||
], | ||
"react-hooks/rules-of-hooks": "error" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["test/**/*.{js,ts,tsx}"], | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"no-unused-expressions": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["**/__generated__/**/*.{js,ts,tsx}"], | ||
"rules": { | ||
"import/order": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["src/common/logger/*.ts"], | ||
"rules": { | ||
"no-console": "off" | ||
} | ||
} | ||
] | ||
} |
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,8 @@ | ||
--- | ||
name: "🐛 Bug report" | ||
about: Report that something isn't working as expected. | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- |
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,8 @@ | ||
--- | ||
name: "🚀 Enhancement" | ||
about: Describe new feature or enhancement | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- |
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 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: "⏩ Pioneer 1.0" | ||
about: Please report issues regarding Pionner 1.0 (https://testnet.joystream.org/#/forum) in the main Joystream repository. | ||
url: https://github.com/Joystream/joystream |
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,154 @@ | ||
name: CI | ||
|
||
on: | ||
push: { branches: [dev, main] } | ||
pull_request: | ||
|
||
jobs: | ||
install: | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: { node: ["18.x"], os: [ubuntu-latest] } | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }} | ||
name: Install dependencies | ||
run: yarn --immutable | ||
|
||
ui-unit-tests: | ||
needs: install | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: { node: ["18.x"], os: [ubuntu-latest] } | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
|
||
- name: Verify linting | ||
run: yarn lint | ||
|
||
- name: Build Pioneer | ||
run: yarn build | ||
|
||
- name: Run tests | ||
run: node --max_old_space_size=7000 --expose-gc $(yarn bin jest) --logHeapUsage --silent | ||
working-directory: packages/ui | ||
|
||
interaction-tests: | ||
needs: install | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: { node: ["18.x"], os: [ubuntu-latest] } | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
|
||
- name: Install Playwright | ||
run: npx playwright install --with-deps | ||
|
||
- name: Get the Storybook preview deployment url | ||
run: | | ||
if [ "$PREFIX" == 'git-fork' ]; then | ||
BRANCH=$(echo -n '${{ env.LABEL }}' | sed 's/:/-/') | ||
else | ||
BRANCH=$(echo -n '${{ env.LABEL }}' | cut -d ':' -f2-) | ||
fi | ||
URL_BRANCH=$(echo -n "$BRANCH" | tr -d '#' | tr -c '[:alnum:]' '-' | tr '[:upper:]' '[:lower:]') | ||
SUBDOMAIN="${{ env.PROJECT }}-${{ env.PREFIX }}-$URL_BRANCH-joystream" | ||
if [ ${#SUBDOMAIN} -gt 63 ]; then | ||
HASH=$(echo -n "${{ env.PREFIX }}-${BRANCH}${{ env.PROJECT }}" | sha256sum | head -c 6) | ||
SUBDOMAIN="$(echo -n "$SUBDOMAIN" | head -c 46 | sed -e 's/[^-]$/\0-/')$HASH-joystream" | ||
fi | ||
echo "VERCEL_DEPLOYMENT_URL=$SUBDOMAIN.vercel.app" >> "$GITHUB_ENV" | ||
env: | ||
PROJECT: pioneer-2-storybook | ||
PREFIX: ${{ github.event.pull_request.head.repo.fork && 'git-fork' || 'git' }} | ||
LABEL: ${{ github.event.pull_request.head.label || github.ref_name }} | ||
|
||
- name: Wait for the deployment to complete | ||
run: | | ||
while true; do | ||
RES=$(curl -L 'https://api.vercel.com/v13/deployments/${{ env.VERCEL_DEPLOYMENT_URL }}') | ||
STATUS=$(echo -n "$RES" | jq -r '.status') | ||
SHA=$(echo -n "$RES" | jq -r '.meta.githubCommitSha') | ||
if [ "$SHA" == 'null' ] || [ "$STATUS" == 'null' ]; then | ||
echo -e "\nError the JSON response is missing expected fields:\n\n$RES\n" >&2 | ||
exit 5 | ||
fi | ||
if [ "$SHA" == '${{ env.COMMIT_SHA }}' ] && [ "$STATUS" == 'READY' ]; then | ||
exit 0 | ||
fi | ||
echo -e '\nWait for the Storybook deployment...\n\n' | ||
sleep 20 | ||
done | ||
env: | ||
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
||
- name: Run Storybook tests | ||
run: yarn workspace @joystream/pioneer test-storybook | ||
env: | ||
TARGET_URL: https://${{ env.VERCEL_DEPLOYMENT_URL }} |
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 @@ | ||
/node_modules | ||
build | ||
coverage | ||
build-storybook | ||
.idea | ||
*.log | ||
.DS_Store | ||
packages/ui/.env | ||
packages/ui/src/services/i18n/utils/csv | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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 @@ | ||
14 |
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 @@ | ||
**/*.md |
Oops, something went wrong.