Skip to content

build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#51) #8

build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#51)

build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#51) #8

name: Per-Package Code Coverage
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
package-test-coverage:
name: Package code coverage
runs-on: ubuntu-latest
# Only run for the original repo, and only the default branch, and only if it's properly protected
if: |
(! github.event.push.head.repo.fork)
&& github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
&& github.ref_protected == true
strategy:
matrix:
package-name: [ core, with-reselect ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- run: corepack enable
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run package tests
run: |
cd packages/${{ matrix.package-name }}
pnpm run test:coverage
- name: Report package test coverage to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ github.token }}
path-to-lcov: packages/${{ matrix.package-name }}/coverage/lcov.info
base-path: packages/${{ matrix.package-name }}
git-branch: x-cov-${{ matrix.package-name }}