diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..0d9b4878 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,49 @@ +# 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: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.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 test + - run: npm run save-coverage + - name: Report to Coveralls (parallel) + uses: coverallsapp/github-action@master + env: + COVERALLS_FLAG_NAME: run-${{ matrix.test_number }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + + finish: + + needs: test + runs-on: ubuntu-latest + + steps: + - name: Report to Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4c2de048..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: node_js -node_js: -- '12' -- '10' -- '8' -before_install: -- sudo apt-get -y install libicu-dev -- npm install -g npm -- npm install -g greenkeeper-lockfile@1 -before_script: greenkeeper-lockfile-update -after_script: greenkeeper-lockfile-upload -script: -- npm test -after_success: -- npm run report -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/070d1502bf5e5f56e80c -env: - global: - secure: RqCdHYuiSk8OYAlu4DvNRPAh46Ln2U0DLVym6DwFONs7JaEltI2p9H7hExairJBpRPEfaFnrpw4IQJ7HDmjcU3Hn9RfKN5xxY/pyVEmU3AqDRu/HDADwLmBSVyY1zDPpclpsjDHn/M9j7ub7qVK7YhX5u+xAAdiwhcl1M9gjL5/FmDh0qcU186QNv9idDWZ2lR5RTbXegO2HNYlB8gfrkhhB/3tbU/JCb9LQYCbuuU/76f225OemXBYVjbvacz8Kic6nm8L3QXxFRr/Vn2NzftdQNxP76CAd/252LnVx0new3IZYuNbpRLze9IRS/cbgqY9MKm8StOfUaY8yYVECsMicrttn9p8YVt5ko2U22y8AtNbe64LCJu1hOIVX3tvl7D4TH9gOtaSOB6hoJirE5N+HnrU9bBf6fIFYDuODSfoG1qpAUYX2m90arzRbZ8WKjgPSChPl/HI23m7sALc08ILMND0kZxNsf6RwKXuzQq9lwt3iycC1nJCQYsJ1FGKTASdMU2U9wjFHkb7zZHp2MsJKDT0BxBzY2B+RzyEgw1ckHfmMJErRbd7DB+JdFPd/24j7z6laeCjmMwGmaR5cbfkVKlCun1YOpFTt7izPG0tct3XWjQkIeRYkJp6WZmEE3oXZanGOJYPrVjZzlOPeKLac4+kDv8LY1adKcZa73uk= diff --git a/package.json b/package.json index 0797d89b..5f197f13 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "lint": "eslint .", "posttest": "nyc report && npm run lint", - "report": "nyc report --reporter=text-lcov | coveralls", + "save-coverage": "nyc report --reporter=lcov", "test": "nyc --reporter=none mocha test/test-*.js" }, "contributors": [