refactor: replaces lodash.memoize with alternatives (#61) #28
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: linting & test coverage - linux | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
CI: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
check: | |
strategy: | |
fail-fast: true | |
matrix: | |
node-version: | |
- 18.x | |
- 22.x | |
platform: | |
- ubuntu-latest | |
runs-on: ${{matrix.platform}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache node modules for ${{matrix.node-version}}@${{matrix.platform}} | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{matrix.node-version}}@${{matrix.platform}}-build-${{hashFiles('package.json')}} | |
restore-keys: | | |
${{matrix.node-version}}@${{matrix.platform}}-build- | |
- name: set up node ${{matrix.node-version}}@${{matrix.platform}} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{matrix.node-version}} | |
- name: install & build | |
run: | | |
node --version | |
npm install | |
npm run build | |
- name: lint & forbidden dependency check (runs on one platform only) | |
run: | | |
node --version | |
npm run lint | |
npm run depcruise | |
if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '22.x' | |
- name: test | |
if: matrix.node-version == '22.x' | |
run: | | |
node --version | |
npm run test:cover | |
- name: test | |
# node 18 doesn't throw a warning when using the native 'punycode' module | |
# it _does_ throw an error when you want to ignore that warning, though. | |
# punycode is b.t.w. pulled in transitively by jsdom | |
if: matrix.node-version == '18.x' | |
run: | | |
node --version | |
npm run test:node18 | |
# - name: report coverage to code climate (runs on one platform only) | |
# if: matrix.node-version == '22.x' | |
# uses: paambaati/[email protected] | |
# env: | |
# CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_TEST_COVERAGE_ID }} |