diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ec4b18..b814bcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,11 @@ name: CI -on: [push] +on: + pull_request: + types: ['opened', 'reopened', 'synchronize'] + push: + branches: + - master jobs: build: @@ -24,4 +29,15 @@ jobs: - name: Build run: yarn build - name: Test - run: yarn test + run: yarn test -- --coverage + - name: Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{secrets.CODECOV_TOKEN}} + - name: Coverage + uses: neofinancial/coverage-upload-action@v1 + with: + coverageEndpoint: $${{secrets.COVERAGE_ENDPOINT}} + coverageToken: ${{secrets.COVERAGE_TOKEN}} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/README.md b/README.md index 64283ed..cb47b46 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Build status](https://github.com/neofinancial/config-dug/workflows/CI/badge.svg)](https://github.com/neofinancial/ccscan/actions) ![TypeScript 3.5.3](https://img.shields.io/badge/TypeScript-3.5.3-brightgreen.svg) +[![coverage](https://coverage.neotools.ca/api/badge/master/sU3MNGvvrQN9LyiFXr1uy3)](https://coverage.neotools.ca/coverage/neofinancial/ccscan) +[![codecov.io](https://codecov.io/github/neofinancial/ccscan/coverage.svg)](https://codecov.io/github/neofinancial/ccscan) Scan files for credit card numbers