From 809e9e7f25631b656483e96da295fceb1872ae5c Mon Sep 17 00:00:00 2001 From: Dmitry Shirokov Date: Wed, 28 Apr 2021 12:27:35 +1000 Subject: [PATCH 1/3] chore: reconfigure ci/cd --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 18 ------------------ README.md | 2 +- 4 files changed, 54 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bf5f30a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: [master] + pull_request: + branches: ["*"] + +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@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run lint + - run: npm test + - run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cb9e714 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release +on: + push: + branches: + - master +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + - name: Install dependencies + run: npm ci + - name: Build module + run: npm run build + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18e5170..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -node_js: - - '10' - - '12' -script: - - npm run lint - - npm test --coverage - - npm run build - -jobs: - include: - - stage: release - node_js: lts/* - deploy: - provider: script - skip_cleanup: true - script: - - npx semantic-release diff --git a/README.md b/README.md index 0af2bff..f5ccdd1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# mmdb-lib [![Build Status](https://api.travis-ci.org/runk/node-maxmind.svg?branch=master)](https://travis-ci.org/runk/node-maxmind) +# mmdb-lib Javascript library for working with Maxmind binary databases (aka mmdb or geoip2). From 48ba87df91687ced76d9f77e53a45bcae2dfa77e Mon Sep 17 00:00:00 2001 From: Dmitry Shirokov Date: Wed, 28 Apr 2021 12:46:43 +1000 Subject: [PATCH 2/3] use action for git submodules --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf5f30a..d3fb538 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: From 56906d816244a2972629e6ee21689789cf22224f Mon Sep 17 00:00:00 2001 From: Dmitry Shirokov Date: Wed, 28 Apr 2021 12:51:15 +1000 Subject: [PATCH 3/3] switch to npm i --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3fb538..15fe1b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: npm ci + - run: npm i - run: npm run lint - run: npm test - run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb9e714..78edde2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: with: node-version: 14 - name: Install dependencies - run: npm ci + run: npm i - name: Build module run: npm run build - name: Release