diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..b6c1081 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,35 @@ +on: ["push", "pull_request"] + +name: Coveralls + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v1 + + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: npm install, npm test:coverage + run: | + npm install + npm run test:coverage + env: + CI: true + + - name: Coveralls Parallel + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./coverage/lcov.info # optional (default value) + + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml index b87d53d..145c3ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,3 @@ jobs: skip_cleanup: true on: tags: true - - stage: Produce Coverage - node_js: stable - script: jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage diff --git a/package.json b/package.json index 939b49a..23f7b98 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "lint": "eslint 'src/**/*.ts'", "lint:fix": "eslint --fix 'src/**/*.ts'", "test": "jest", + "test:coverage": "jest --coverage", "preversion": "npm test", "version": "npm run build && git add -A dist", "postversion": "git push && git push --tags && rm -rf build/temp",