Update dependency @types/node to v22.9.2 #2200
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
# This is a basic workflow to help you get started with Actions | |
name: test | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the develop branch | |
push: | |
branches: [master, develop] | |
tags: | |
- "*" | |
pull_request: | |
branches: [master, develop] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
test: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Update npm and install packages | |
run: | | |
npm i -g npm@latest yarn@latest | |
yarn install | |
- name: Test with jest | |
run: yarn test | |
- name: Test with jest with webcrypto shim for browsers | |
run: yarn jest:web | |
- name: Install lcov and merge coverage info | |
run: | | |
sudo apt install lcov | |
find ./coverage -name lcov.info -exec echo -a {} \; | xargs lcov -o ./coverage/merged-lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./coverage/merged-lcov.info | |
publish: | |
needs: test | |
if: startsWith(github.event.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
# Defaults to the user or organization that owns the workflow file | |
scope: "@octocat" | |
- run: yarn | |
- run: yarn build | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |