.github: Add Scorecard workflow #180
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: Run Jest Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '19.9.0' # Use your desired Node.js version | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Jest tests | |
run: npm test | |
- name: Upload npm debug log on failure | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: npm-debug-log | |
path: /home/runner/.npm/_logs/*-debug.log |