chore(deps): lock file maintenance (#74) #169
This file contains hidden or 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 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
- name: Install NPM dependencies 📦 | |
uses: bahmutov/npm-install@v1 | |
- name: Unit tests 🧪 | |
run: npm test | |
- name: Check all covered files 📊 | |
run: | | |
node bin/check-coverage main1.js | |
node bin/check-coverage to/main2.js | |
node bin/only-covered main1.js main2.js | |
# and can check multiple files at once | |
node bin/check-coverage main1.js main2.js | |
- name: Check totals 🛡 | |
run: node bin/check-total --min 30 | |
- name: Set commit status using REST | |
# https://developer.github.com/v3/repos/statuses/ | |
run: | | |
curl --request POST \ | |
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
--header 'content-type: application/json' \ | |
--data '{ | |
"state": "success", | |
"description": "REST commit status", | |
"context": "a test" | |
}' | |
- name: Set code coverage commit status 📫 | |
run: node bin/set-gh-status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check coverage change from README 📫 | |
run: node bin/set-gh-status --check-against-readme | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update code coverage badge 🥇 | |
run: node bin/update-badge | |
- name: Semantic Release 🚀 | |
uses: cycjimmy/semantic-release-action@v3 | |
if: github.ref == 'refs/heads/master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |