chore: Fix vulnerabilities (#10) #8
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 / Upload Test Coverage to Coveralls | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
ci-upload-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
# Cache yarn dependencies | |
- name: Cache yarn dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn install | |
# Run tests | |
- name: Run tests | |
run: yarn test | |
# Run coverage | |
- name: Run coverage | |
run: yarn coverage | |
# Upload coverage results | |
- name: Upload coverage to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
coveralls-token: ${{ secrets.COVERALLS_TOKEN }} | |
if: success() |