diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8670f36b..f6852ddf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.11.1 + node-version: 20 cache: "yarn" # caches the yarn cache folder not node_modules # Automated Version Bump diff --git a/.github/workflows/qc.yml b/.github/workflows/qc.yml new file mode 100644 index 00000000..423abb45 --- /dev/null +++ b/.github/workflows/qc.yml @@ -0,0 +1,38 @@ +name: Quality Check + +on: + push: + paths-ignore: + - "README.md" + - "LICENSE" + +jobs: + qc: + runs-on: ubuntu-latest + timeout-minutes: 3 + strategy: + matrix: + NODE_VERSION: [18.19.1, 20.11.1] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.NODE_VERSION }} + cache: "yarn" # caches the yarn cache folder not node_modules + + - name: Install packages + run: yarn install --frozen-lockfile + + - name: "Build test" + run: yarn build + + # - name: Lint test + # run: yarn lint + + - name: Run tests + run: yarn test diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ee7a78b4..00000000 --- a/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM node:latest -RUN mkdir /src -RUN cd /src -COPY package.json /src -WORKDIR /src -RUN npm install -g typescript@2.7.2 -RUN cd /src && npm install -COPY . /src -CMD ["sh", "./develop.sh"] \ No newline at end of file diff --git a/build.sh b/build.sh deleted file mode 100755 index def635a7..00000000 --- a/build.sh +++ /dev/null @@ -1,9 +0,0 @@ - -docker run -it \ --v $(pwd)/src:/src/src \ --v $(pwd)/test:/src/test \ --v $(pwd)/dist:/src/dist \ --v $(pwd)/lib:/src/lib \ --v $(pwd)/declarations:/src/declarations \ -rylorin/technicalindicators \ -npm -- run build-lib \ No newline at end of file diff --git a/develop.sh b/develop.sh deleted file mode 100644 index 90be3fc9..00000000 --- a/develop.sh +++ /dev/null @@ -1,2 +0,0 @@ -tsc -d -p . -w & -npm run test \ No newline at end of file diff --git a/package.json b/package.json index 53ca9a75..01f74e44 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "generateDts": "./generateTsDefinitions.sh", "start": "sh test.sh", "test": "mocha --recursive --require @babel/register", - "test:watch": "mocha --watch --require @babel/register" + "test:watch": "mocha --watch --recursive --require @babel/register" }, "dependencies": {}, "devDependencies": { @@ -118,12 +118,12 @@ "@babel/register": "^7.23.7", "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-terser": "^0.4.4", - "@types/node": "^20.11.27", + "@types/node": "^20.11.28", "bl": "^6.0.12", "draw-candlestick": "2.0.3", "dts-bundle": "^0.7.3", "inquirer": "^9.2.16", - "koa": "^2.15.0", + "koa": "^2.15.1", "koa-static": "^5.0.0", "lit-html": "^3.1.2", "mocha": "^10.3.0", @@ -142,7 +142,7 @@ "typescript": "^5.4.2" }, "engines": { - "node": ">=20" + "node": ">=18" }, "publishConfig": { "access": "public" diff --git a/test.sh b/test.sh deleted file mode 100755 index 078fba93..00000000 --- a/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -docker run -it \ --v $(pwd)/src:/src/src \ --v $(pwd)/test:/src/test \ --v $(pwd)/dist:/src/dist \ --v $(pwd)/lib:/src/lib \ --v $(pwd)/declarations:/src/declarations \ -rylorin/technicalindicators \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 29c67992..e04484c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1255,10 +1255,10 @@ resolved "https://registry.npmjs.org/@types/node/-/node-8.0.0.tgz" integrity sha512-j2tekvJCO7j22cs+LO6i0kRPhmQ9MXaPZ55TzOc1lzkN5b6BWqq4AFjl04s1oRRQ1v5rSe+KEvnLUSTonuls/A== -"@types/node@^20.11.27": - version "20.11.27" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.27.tgz#debe5cfc8a507dd60fe2a3b4875b1604f215c2ac" - integrity sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg== +"@types/node@^20.11.28": + version "20.11.28" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.28.tgz#4fd5b2daff2e580c12316e457473d68f15ee6f66" + integrity sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA== dependencies: undici-types "~5.26.4" @@ -3995,10 +3995,10 @@ koa-static@^5.0.0: debug "^3.1.0" koa-send "^5.0.0" -koa@^2.15.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/koa/-/koa-2.15.0.tgz#d24ae1b0ff378bf12eb3df584ab4204e4c12ac2b" - integrity sha512-KEL/vU1knsoUvfP4MC4/GthpQrY/p6dzwaaGI6Rt4NQuFqkw3qrvsdYF5pz3wOfi7IGTvMPHC9aZIcUKYFNxsw== +koa@^2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/koa/-/koa-2.15.1.tgz#3d03840b8d9684c51b2b05a40ee7e7ba8621084c" + integrity sha512-kpxzGxsv7tlc0WmccWd6CfdWqYXk4o/FsCTjnKaDnHLjPK/Sy1MpoBkuKO5LN7GdPHgPljrAVmMO3wbFxEJTeA== dependencies: accepts "^1.3.5" cache-content-type "^1.0.0"