Update dependency typescript to v5.4.2 #668
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
all: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Set node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
# https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows | |
- name: Reuse npm cache folder | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# reuse the npm-cache and some node_modules folders | |
path: | | |
~/.npm | |
./node_modules | |
# invalidate cache when any package.json changes | |
key: ${{ runner.os }}-npm-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-${{ env.cache-name }}- | |
${{ runner.os }}-npm- | |
${{ runner.os }}- | |
# install | |
- name: install node modules | |
run: npm install --legacy-peer-deps | |
- run: npm run build | |
- run: npm run test:node | |
- name: test browser | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
working-directory: ./ #optional | |
run: npm run test:browser | |
- name: test:tryings | |
run: npm run test:typings | |
- name: lint | |
run: npm run lint |