diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..127e191 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + strategy: + matrix: + node-version: [10, 12, 14, 16, 18, 20] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + # Can not use cache as package-lock.json is not commited in Git + # cache: 'npm' + - run: npm install + - run: npm run test-ci + - name: Coveralls + uses: coverallsapp/github-action@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2b27c7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - 10 - - 8 - - 6 - - 4 - - "0.10" -script: - - "npm run test-travis" -after_script: - - "npm install coveralls@2 && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" - diff --git a/README.md b/README.md index 078f7cf..23dd79b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # yauzl -[![Build Status](https://travis-ci.org/thejoshwolfe/yauzl.svg?branch=master)](https://travis-ci.org/thejoshwolfe/yauzl) +[![Build Status](https://github.com/thejoshwolfe/yauzl/actions/workflows/build.yml/badge.svg)](https://github.com/thejoshwolfe/yauzl/actions/workflows/build.yml) [![Coverage Status](https://img.shields.io/coveralls/thejoshwolfe/yauzl.svg)](https://coveralls.io/r/thejoshwolfe/yauzl) yet another unzip library for node. For zipping, see diff --git a/package.json b/package.json index 4f1144a..f69a0ff 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "node test/test.js", "test-cov": "istanbul cover test/test.js", - "test-travis": "istanbul cover --report lcovonly test/test.js" + "test-ci": "istanbul cover --report lcovonly test/test.js" }, "repository": { "type": "git",