chore(deps): update pnpm to v9.13.1 #2574
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: build | |
on: | |
push: | |
branches: | |
- main | |
- 'renovate/**' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: ${{ github.ref_name != 'main' }} | |
env: | |
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
DRY_RUN: true | |
permissions: | |
contents: read | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
show-progress: false | |
- name: 📥 Setup Node.js | |
uses: ./.github/actions/setup-node | |
with: | |
save-cache: true | |
test: | |
needs: | |
- prepare | |
name: ${{ matrix.node-version == 22 && format('test ({0})', matrix.os) || format('test ({0}, node-{1})', matrix.os, matrix.node-version) }} | |
runs-on: ${{ matrix.os }} | |
# tests shouldn't need more time | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node-version: | |
- 20 | |
- 22 | |
env: | |
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 22 }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 10 # required for coverage | |
show-progress: false | |
filter: blob:none # we don't need all blobs | |
- name: 📥 Setup Node.js | |
uses: ./.github/actions/setup-node | |
with: | |
node-version: ${{ matrix.node-version }} | |
save-cache: true | |
- name: Init platform | |
shell: bash | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
echo "Node $(node --version)" | |
echo "pnpm $(pnpm --version)" | |
- name: Build | |
run: pnpm build | |
- name: Unit tests | |
run: pnpm jest --maxWorkers=2 --ci --coverage ${{ env.coverage }} --logHeapUsage | |
- name: Upload coverage | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
if: always() && env.coverage == 'true' | |
with: | |
name: coverage | |
path: coverage | |
- name: Codecov | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
if: env.coverage == 'true' | |
lint: | |
needs: | |
- prepare | |
runs-on: ubuntu-latest | |
# lint shouldn't need more than 10 min | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
show-progress: false | |
- name: 📥 Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Init platform | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
echo "Node $(node --version)" | |
echo "pnpm $(pnpm --version)" | |
- name: Lint | |
run: | | |
pnpm eslint -f gha | |
pnpm markdown-lint | |
pnpm prettier | |
- name: Type check | |
run: pnpm type-check | |
release: | |
needs: | |
- lint | |
- test | |
runs-on: ubuntu-latest | |
# release shouldn't need more than 5 min | |
timeout-minutes: 15 | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
# full checkout for semantic-release | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
show-progress: false | |
filter: blob:none # we don't need all blobs | |
- name: 📥 Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Init platform | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Check dry run | |
run: | | |
if [[ "${{github.event_name}}" == "workflow_dispatch" && "${{ github.event.inputs.dryRun }}" != "true" ]]; then | |
echo "DRY_RUN=false" >> $GITHUB_ENV | |
elif [[ "${{github.ref}}" == "refs/heads/${{env.DEFAULT_BRANCH}}" ]]; then | |
echo "DRY_RUN=false" >> $GITHUB_ENV | |
elif [[ "${{github.ref}}" =~ ^refs/heads/v[0-9]+(\.[0-9]+)?$ ]]; then | |
echo "DRY_RUN=false" >> $GITHUB_ENV | |
fi | |
- name: semantic-release | |
run: pnpm semantic-release --dry-run ${{github.ref != 'refs/heads/main'}} --ci ${{github.ref == 'refs/heads/main'}} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |