Skip to content

fix(dotprompt-emacs): remove internal markup from end-user features #686

fix(dotprompt-emacs): remove internal markup from end-user features

fix(dotprompt-emacs): remove internal markup from end-user features #686

Workflow file for this run

# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: "JS checks"
on:
pull_request:
branches: [ main ]
permissions:
contents: write
pull-requests: write
jobs:
check-paths:
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
js/**
spec/**
packages/**
pnpm-lock.yaml
pnpm-workspace.yaml
.github/workflows/js.yml
pnpm-lock-check:
needs: check-paths
if: needs.check-paths.outputs.any_changed == 'true'
runs-on: ubuntu-latest
name: pnpm-lock.yaml Check
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Check if this is a release-please PR
id: check-release-please
run: |
if [[ "${GITHUB_HEAD_REF}" == release-please--* ]]; then
echo "is_release_please=true" >> $GITHUB_OUTPUT
else
echo "is_release_please=false" >> $GITHUB_OUTPUT
fi
- name: Update lockfiles for release-please PR
if: steps.check-release-please.outputs.is_release_please == 'true'
run: |
echo "Updating pnpm-lock.yaml for release-please PR..."
pnpm install --lockfile-only
- name: Commit lockfile updates
if: steps.check-release-please.outputs.is_release_please == 'true'
run: |
# Use CLA-covered maintainer identity from MAINTAINERS.yaml
git config user.name "$(yq '.ci.commit_author.name' MAINTAINERS.yaml)"
git config user.email "$(yq '.ci.commit_author.email' MAINTAINERS.yaml)"
if ! git diff --quiet pnpm-lock.yaml js/pnpm-lock.yaml; then
git add pnpm-lock.yaml js/pnpm-lock.yaml 2>/dev/null || true
git commit -m "chore: update pnpm lockfiles" || echo "No changes to commit"
git push || echo "Nothing to push"
echo "Lockfiles updated and pushed"
else
echo "No lockfile changes needed"
fi
- name: Check pnpm-lock.yaml is up to date
run: |
pnpm install --frozen-lockfile
echo "✅ pnpm-lock.yaml is up to date"
format-check:
needs: check-paths
if: needs.check-paths.outputs.any_changed == 'true'
runs-on: ubuntu-latest
name: JS/TS Format Check
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm -C js install
- name: Check formatting with Biome
run: pnpm dlx @biomejs/biome check --formatter-enabled=true --linter-enabled=false js/
test:
name: Run tests (Node ${{ matrix.node-version }}, ${{ matrix.typescript-compiler }})
runs-on: ubuntu-latest
needs: [check-paths, format-check]
if: needs.check-paths.outputs.any_changed == 'true'
strategy:
matrix:
node-version: ["20", "21", "22", "23", "24"]
typescript-compiler: ["tsc", "tsgo"]
steps:
- uses: actions/checkout@v6
- name: Setup Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm -C js install
- name: Run tests
run: pnpm -C js test
- name: Build (tsc)
if: matrix.typescript-compiler == 'tsc'
run: pnpm -C js build
- name: Build (tsgo)
if: matrix.typescript-compiler == 'tsgo'
run: pnpm -C js build:native
js-checks-all:
if: always()
needs: [pnpm-lock-check, format-check, test]
runs-on: ubuntu-latest
steps:
- name: Check overall status
run: |
if [[ "${NEEDS_PNPM_LOCK_CHECK_RESULT}" == "failure" || "${NEEDS_FORMAT_CHECK_RESULT}" == "failure" || "${NEEDS_TEST_RESULT}" == "failure" ]]; then
echo "JS checks failed"
exit 1
fi
echo "JS checks passed or were skipped"
exit 0
env:
NEEDS_PNPM_LOCK_CHECK_RESULT: ${{ needs.pnpm-lock-check.result }}
NEEDS_FORMAT_CHECK_RESULT: ${{ needs.format-check.result }}
NEEDS_TEST_RESULT: ${{ needs.test.result }}