Skip to content

Update Node.js to v22 #171

Update Node.js to v22

Update Node.js to v22 #171

Workflow file for this run

name: Test
concurrency:
group: tests-${{ github.ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
build:
name: Node unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['21']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ matrix.node }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install dependencies
run: pnpm install
- name: Lint source
run: |
pnpm check:ci
- name: Build package
run: |
pnpm build
- name: Run tests
run: |
pnpm test:ci
env:
CI: true
- name: Generate Code Coverage report
id: code-coverage
uses: barecheck/code-coverage-action@v1
# you can setup code coverage comparison with main branch
with:
lcov-file: "./coverage/lcov.info"
send-summary-comment: true
show-annotations: "warning"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Consume changesets'
if: github.event_name == 'push' && github.repository == 'ivandotv/untilted' && matrix.node == 21 && github.ref == 'refs/heads/main'
uses: changesets/action@v1
id: 'changesets'
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
version: pnpm bump:version
publish: pnpm release
commit: version bump
title: Next release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}