-
Notifications
You must be signed in to change notification settings - Fork 3
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 71145f6
Showing
485 changed files
with
49,439 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,19 @@ | ||
*.js | ||
*.css | ||
**/vite.config.ts | ||
**/vite.server.ts | ||
**/vitest.config.ts | ||
**/vitest.setup.ts | ||
**/cypress | ||
**/constant/lang.ts | ||
**/glove-blog | ||
config/** | ||
# 忽略自动生成的文件 | ||
**/i18n/index.ts | ||
**/i18n/serveLang.ts | ||
**/node_modules/ | ||
**/dist/ | ||
**/dist-ser/ | ||
**/routers/_apis.ts | ||
**/routers/_serves.ts | ||
**/routers/_pages.ts |
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,49 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
jest: false, | ||
}, | ||
globals: { | ||
global: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"prettier", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
projectFolderIgnoreList: [], | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
project: "tsconfig.json", | ||
tsconfigRootDir: __dirname, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: { | ||
"no-undefined": 2, | ||
"no-ignore": 0, | ||
useUnknownInCatchVariables: 0, | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/restrict-plus-operands": 0, | ||
"@typescript-eslint/explicit-module-boundary-types": 0, | ||
"@typescript-eslint/no-non-null-assertion": 0, | ||
"@typescript-eslint/no-unused-vars": 2, | ||
"@typescript-eslint/no-unsafe-assignment": 0, | ||
"@typescript-eslint/no-unsafe-call": 0, | ||
"@typescript-eslint/no-unsafe-member-access": 0, | ||
"@typescript-eslint/no-floating-promises": 0, | ||
"@typescript-eslint/require-await": 0, | ||
"@typescript-eslint/no-empty-function": 0, | ||
"@typescript-eslint/no-unsafe-return": 0, | ||
"@typescript-eslint/no-unsafe-argument": 0, | ||
"@typescript-eslint/restrict-template-expressions": 0, | ||
"@typescript-eslint/no-misused-promises": 0, | ||
}, | ||
}; |
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,10 @@ | ||
This workflow will do a clean installation of node dependencies, cache/restore them, 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 | ||
|
||
## ssh 配置步骤: | ||
|
||
1. 生成密钥:ssh-keygen -t rsa -b 4096 -C "[email protected]", 输入名称为 github-actioner | ||
2. 拷贝 SSH_PRIVATE_KEY 的 公钥需要添加到目标服务器,并且添加到 .ssh/authorized_keys 中,操作如下 rsync -av github-actions.pub [email protected]:~/.ssh cat github-actions.pub >> authorized_keys | ||
3. 在 github/项目/setting/Actions secrets 中,添加 SSH_PRIVATE_KEY, 从 Begin 复制到 End, 例子: -----BEGIN OPENSSH PRIVATE KEY----- xxxxx -----END OPENSSH PRIVATE KEY----- | ||
4. 在 github/项目/setting/Actions secrets 中,添加 SSH_URL, 例子:[email protected] |
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,56 @@ | ||
name: testflowy_release | ||
|
||
on: | ||
push: | ||
branches: [release/testflowy] | ||
pull_request: | ||
branches: [release/testflowy] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
deploy_client: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: build | ||
run: | | ||
pnpm build | ||
- name: deploy | ||
run: | | ||
touch deploy_key | ||
echo "${{secrets.GG_SSH_PRIVATE_KEY}}" > deploy_key | ||
chmod 600 ./deploy_key | ||
rsync -av -e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' ./app/dist/* ${{ secrets.GG_SSH_URL }}:~/static/testflowy/ | ||
rsync -av -e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' ./app/dist-ser/* ${{ secrets.GG_SSH_URL }}:~/server/testflowy/ |
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,48 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
**/tsconfig.tsbuildinfo | ||
**/node_modules | ||
.idea | ||
**/.idea | ||
.pnp | ||
.pnp.js | ||
.env | ||
**/.env | ||
.eslintcache | ||
**/.eslintcache | ||
target | ||
**/target | ||
# testing | ||
coverage | ||
.vscode | ||
**/.vscode | ||
apps/testflowy/public/tool | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
build | ||
dist | ||
dist-ser | ||
**/dist | ||
**/dist-ser | ||
**/*.swp | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
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" | ||
|
||
npm run check |
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 @@ | ||
# 忽略自动生成的文件 | ||
rightos/src/apis.ts | ||
**/i18n/index.ts | ||
**/i18n/serveLang.ts | ||
**/routers/_apis.ts | ||
**/routers/_serves.ts | ||
**/routers/_pages.ts | ||
apps/testflowy/public/tool |
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,150 @@ | ||
# Why use Testflow? | ||
|
||
[Web Site](https://testflowy.com/) | ||
|
||
[Document](https://testflowy.com/#/welcome/doc) | ||
|
||
## What is Testflow? | ||
|
||
Testflow aspires to become the simplest Web automated testing platform. It can help front-end engineers and test engineers record behavior operations, and share test behavior through team accounts, facilitating any member of the team to quickly and conveniently return to automated testing | ||
|
||
## Testflow compared with traditional manual writing (integration) test | ||
|
||
For manually writing integration test code, there are always the following difficulties | ||
How to quickly train engineers to learn how to write automated test code? | ||
How to reduce the cost of writing integration test code? | ||
How to make automated testing work better in the whole team? | ||
In order to better cooperate in the whole team, you need to build a set of automated test platform, which requires 1-2 senior test engineers to spend tens of days | ||
Using Testflow, you can easily solve the above problems | ||
Engineers do not need to write test code | ||
Easier aggregation, replication, mocking your test tasks | ||
Through the Testflow team account system, automated testing can be coordinated across the entire team | ||
|
||
## Advantages of Testflow | ||
|
||
With Testflow, you only need to register to get a set of automated test platform. Engineers and testers do not need to write any code. Testflow will help you record your behavior and share it with the whole team to reuse your tests. All this is done in a real Web environment, without any additional virtual environment | ||
|
||
## Disadvantages of Testflow | ||
|
||
Testflow is based on a real browser environment. Its feature is that it has no construction cost and is more suitable for real business scenarios The disadvantage is that it only supports the browser platform, and the simulation of complex behavior is poor, and the ability of behavior involving external site authorization is poor (such as payment, cross-platform authorization, etc.) You need to use manual testing when it involves behavior across external sites | ||
|
||
## Prerequisites | ||
|
||
Install pnpm: | ||
|
||
```sh | ||
npm i -g pnpm | ||
``` | ||
|
||
Use pnpm to install dependencies and link them: | ||
|
||
``` | ||
pnpm i | ||
``` | ||
|
||
## Development | ||
|
||
```sh | ||
pnpm dev | ||
``` | ||
|
||
## Build | ||
|
||
```sh | ||
pnpm build | ||
``` | ||
|
||
## Check | ||
|
||
The project has commit interception, but please avoid maliciously bypassing the pnpm check before committing. | ||
|
||
## Important | ||
|
||
The package.json of the business code must have "private": true set to prevent accidental publishing of business code to npm. | ||
|
||
To publish a package, all non-private packages in the packages directory will be published to npm, and the workspace:\* dependencies will be automatically modified. Make sure the pnpm version is greater than 7.4: | ||
|
||
```sh | ||
pnpm publish --no-git-checks -r | ||
``` | ||
|
||
## Separating Business Code and Non-business Code | ||
|
||
Keep the business code in several projects under the apps directory; abstract the non-business code into the packages directory. | ||
|
||
## Project Constraints | ||
|
||
The config directory contains unified eslint, ts-config, and test configurations for all projects and libraries. Reuse these configurations for all packages. | ||
|
||
## Naming Conventions | ||
|
||
1. APIs use account_read_one. | ||
2. Constants use ACCOUNT_READ_ONE. | ||
3. JavaScript functions and objects use accountReadOne. | ||
4. Interfaces/Types use AccountReadOne. | ||
|
||
## .env | ||
|
||
Each .env file should be configured in both the apps/xxx and packages directories because their pg_url differs. | ||
|
||
```sh | ||
# translate | ||
translate_appid="xxxxxxxxxx" | ||
translate_password="xxxxxxxxxx" | ||
|
||
# server-env | ||
is_dev=1 | ||
slat="pkg_slat_v1" | ||
|
||
# dbs | ||
redis_url="redis://:[email protected]:9379?db=1" | ||
pg_url="postgres://postgres:[email protected]:9432/db?sslmode=disable" | ||
|
||
email_user="[email protected]" | ||
email_pass="xxxxxxx" | ||
email_host="smtp.qcloudmail.com" | ||
email_port="465" | ||
|
||
VITE_paypal_client_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
paypal_client_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
paypal_client_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
paypal_webhook_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
``` | ||
|
||
If using baidu i18n translation, please configure the env file: | ||
|
||
```sh | ||
# translate | ||
translate_appid="xxxxxx" | ||
translate_password="xxxxxxxxxxxx" | ||
``` | ||
|
||
## .vscode Settings (Optional) | ||
|
||
`.vscode/settings.json` : | ||
|
||
```json | ||
{ | ||
"makefile.extensionOutputFolder": "./.vscode", | ||
"files.exclude": { | ||
"**/node_modules": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true | ||
} | ||
} | ||
``` | ||
|
||
## +serve Restful Semantics | ||
|
||
```sh | ||
Create - POST | ||
Read - GET | ||
Update - PATCH | ||
Delete - DELETE | ||
Create or update - PUT | ||
``` | ||
|
||
Where PUT updates if historical data is found; otherwise, it creates a new entry. |
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 @@ | ||
*.js | ||
*.css | ||
**/vite.config.ts | ||
**/vite.server.ts | ||
**/vitest.config.ts | ||
**/vitest.setup.ts | ||
**/cypress | ||
**/constant/lang.ts | ||
config/** | ||
# 忽略自动生成的文件 | ||
**/i18n/index.ts | ||
**/i18n/serveLang.ts | ||
**/node_modules/ | ||
**/dist/ | ||
**/dist-ser/ | ||
**/routers/_apis.ts | ||
**/routers/_serves.ts | ||
**/routers/_pages.ts |
Oops, something went wrong.