Skip to content

Merge pull request #101 from kerren/feature/github-action-matrix #48

Merge pull request #101 from kerren/feature/github-action-matrix

Merge pull request #101 from kerren/feature/github-action-matrix #48

Workflow file for this run

name: 'signalstory-ci'
on:
push:
branches:
- master
pull_request:
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.version }}-build-${{ env.cache-name }}-
${{ runner.os }}-node-${{ matrix.version }}-build-
${{ runner.os }}-node-${{ matrix.version }}-
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: 'npm'
- name: Install dependencies
run: npm i --legacy-peer-deps
- name: Run ESLint
run: npm run lint
- name: Run Build
run: npm run build -- signalstory
- name: Run unit tests
run: npm run test
- name: Check Tree-shakeability
run: npx agadoo ./dist/signalstory/fesm2022/signalstory.mjs