diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000000..86e16c2a0a3 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1 @@ +{ "extends": ".eslintrc.shared.json", "env": { "node": true, "browser": true, "es2021": true }, "parserOptions": { "ecmaVersion": 2021, "sourceType": "module" } } \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..2518012a3d8 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + npm install + + - name: Run ESLint + run: | + npx eslint . + + - name: Run Prettier + run: | + npx prettier --check . \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..55168d59ce3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Run tests for core + run: cd core && npm test + continue-on-error: true + + - name: Run tests for binary + run: cd binary && npm test + continue-on-error: true + + - name: Upload coverage reports + uses: codecov/codecov-action@v3 + if: always() \ No newline at end of file diff --git a/.github/workflows/type-check.yml b/.github/workflows/type-check.yml new file mode 100644 index 00000000000..59376ff5bbb --- /dev/null +++ b/.github/workflows/type-check.yml @@ -0,0 +1 @@ +name: TypeScript Type Checking\n\non:\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n\njobs:\n type-check:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout repository\n uses: actions/checkout@v2\n \n - name: Setup Node.js\n uses: actions/setup-node@v2\n with:\n node-version: '14'\n \n - name: Install dependencies\n run: |\n npm install\n \n - name: Type Check\n run: |\n npm run type-check\n env:\n CI: true\n \ No newline at end of file diff --git a/README.md b/README.md index 47c4b614357..65ab9d4e7be 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ + +