readme updated #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
run: npm run test -- --coverage | |
- name: Upload coverage to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: npx coveralls < ./coverage/lcov.info | |
- name: Create coverage badge | |
run: | | |
BADGE_URL="https://s3.amazonaws.com/assets.coveralls.io/badges/coveralls_96.svg" | |
echo "" > coverage-badge.md | |
cat coverage-badge.md | |
- name: Commit coverage badge | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add coverage-badge.md | |
git commit -m "Update coverage badge" | |
git push |