From e0cba7110cf644fa164473ab50b46cf1c184b421 Mon Sep 17 00:00:00 2001 From: Rising Odegua Date: Sun, 24 Jan 2021 12:08:51 +0100 Subject: [PATCH 1/2] Update test script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3262ecf9..901d4682 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "xlsx": "^0.16.7" }, "scripts": { - "test": "yarn run bundle && karma start --single-run --browsers ChromeHeadless karma.conf.js", + "test": "yarn run build && karma start --single-run --browsers ChromeHeadless karma.conf.js", "build": "babel ./danfojs/src -d ./dist --no-comments", "lint": "eslint ./danfojs/src", "bundle": "yarn run build && webpack --mode production", From f7e0d4ae5ad845997dc03bac5d3394e5a018a45d Mon Sep 17 00:00:00 2001 From: Rising Odegua Date: Sun, 24 Jan 2021 12:31:14 +0100 Subject: [PATCH 2/2] Automated semantic of danfojs release to npm --- .github/workflows/npm-publish.yml | 29 ------------------------- .github/workflows/test-and-release.yaml | 23 ++++++++++++++++++++ package.json | 1 + 3 files changed, 24 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml create mode 100644 .github/workflows/test-and-release.yaml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 8762a43f..00000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,29 +0,0 @@ -# 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: Node.js CI - -on: - push: - branches: [ $default-branch ] - pull_request: - branches: [ $default-branch ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x, 14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm run test diff --git a/.github/workflows/test-and-release.yaml b/.github/workflows/test-and-release.yaml new file mode 100644 index 00000000..b58dfca6 --- /dev/null +++ b/.github/workflows/test-and-release.yaml @@ -0,0 +1,23 @@ +name: Test and Release +on: [push] + +jobs: +test-and-release: + name: Run tests and release + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm run semantic-release \ No newline at end of file diff --git a/package.json b/package.json index 901d4682..7ce4af8c 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "coverage": "nyc report --reporter=text-lcov | coveralls && nyc report --reporter=lcov", "patch": "npm version patch" }, + "publishConfig": { "access": "public", "branches": ["master"] }, "repository": { "type": "git", "url": "git+https://github.com/opensource9ja/danfojs.git"