chore(deps): bump the npm_and_yarn group across 1 directories with 1 update #41
Workflow file for this run
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: | |
pull_request: | |
push: | |
branches: | |
- canary | |
- main | |
jobs: | |
audit-build-test-release: | |
name: Audit, build, test, release on ${{ matrix.os }}, Node ${{ matrix.node }} | |
# The minimum set of permissions required by semantic-release/github for | |
# the GITHUB_TOKEN and this job is explained here: | |
# https://github.com/semantic-release/github#configuration | |
# https://github.com/semantic-release/semantic-release/issues/2481#issuecomment-1409780688 | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
os: [ubuntu-latest] | |
# Test all packages with: | |
# 1. Maintenance LTS | |
# 2. Active LTS | |
# 3. Current (i.e. the latest Node.js version available) | |
# https://nodejs.org/en/about/previous-releases | |
node: [lts/Iron] | |
# node: [lts/Hydrogen, lts/Iron, current] | |
steps: | |
- name: ποΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: βοΈ Set up Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: β¬οΈ Install dependencies | |
run: npm ci | |
- name: π‘οΈ Audit dependencies (audit-level high) | |
# https://docs.npmjs.com/cli/v8/commands/npm-audit#audit-level | |
run: npm audit --audit-level high | |
- name: π‘οΈ Audit dependencies (audit-level moderate) | |
continue-on-error: true | |
run: npm audit --audit-level moderate | |
- name: π¨ Build TypeScript files | |
run: npm run build:ts | |
- name: π Test | |
run: npm run test | |
- name: π Test CI | |
continue-on-error: true | |
# From time to time the Node.js test runner fails when generating a coverage report. No idea why. | |
run: npm run test:ci | |
- name: β¬οΈ Upload test coverage to Codecov | |
if: runner.os == 'Linux' | |
# https://github.com/marketplace/actions/codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: false | |
files: ./coverage/lcov.info | |
verbose: true | |
- run: npx publint run . | |
- name: π¦ Size report | |
if: ${{ github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' }} | |
uses: pkg-size/action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
build-command: false # because we have just built (otherwise: npm run build:ts) | |
display-size: uncompressed,gzip,brotli | |
# ignore all docs, TS type definitions and JS/TS source maps | |
hide-files: '{api-docs/**,docs/**,*.d.ts,*.map}' | |
unchanged-files: show | |
- name: π Release to npmjs | |
if: ${{ matrix.os == 'ubuntu-latest' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/canary') }} | |
env: | |
# This github token must allow to push to this GitHub repository. | |
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }} | |
TELEGRAM_BOT_ID: ${{ secrets.TELEGRAM_BOT_ID }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
TELEGRAM_CHAT_ID: ${{ fromJSON(secrets.TELEGRAM).chat_id }} | |
run: npx semantic-release --ci | |
macos-build-test: | |
name: Build & test on ${{ matrix.os }}, Node ${{ matrix.node }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [macos-latest] | |
node: [lts/Iron] | |
steps: | |
- name: ποΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: βοΈ Set up Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: β¬οΈ Install dependencies | |
run: npm ci | |
- name: π¦ Build npm package | |
run: npm run build:ts | |
- name: π Test | |
run: npm run test | |
windows-build-test: | |
name: Build & test on ${{ matrix.os }}, Node ${{ matrix.node }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [windows-latest] | |
node: [lts/Iron] | |
steps: | |
- name: ποΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: βοΈ Set up Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: β¬οΈ Install dependencies | |
run: npm ci | |
- name: π¦ Build npm package | |
run: npm run build:ts | |
- name: π Test | |
run: npm run test |