Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/setup-node-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup Node + pnpm
description: Install the repository's pinned pnpm, cache its store, and install from the lockfile.

runs:
using: composite
steps:
- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
6 changes: 0 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@

# Overview of Changes

## [subheading if needed]

## [more subheadings if needed]

# Follow-ups

- [ ] Future issue title if needed
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 24
- name: Setup Node + pnpm
uses: ./.github/actions/setup-node-pnpm

- name: Validate published community files
run: npm run check
run: pnpm check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ The files under `.github/` are published copies from the pinned
Update the source repository, publish a release, then update the files and
checksums here together.

Run `npm run check` before opening a pull request. Use the organization
Run `pnpm check` before opening a pull request. Use the organization
`github-contribution` skill for GitHub creation.
6 changes: 3 additions & 3 deletions SOURCE.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"repository": "LasVegasForTransit/repository-tooling",
"ref": "v0.1.1",
"commit": "264ab732a37162a1b1b324f51820b1a5b0537550",
"ref": "v0.1.3",
"commit": "d74383bc14738153114aa0b00f5278470da3fc26",
"files": {
".github/ISSUE_TEMPLATE/bug.yml": "640865f0fc20f6dbc5335db7a9a3a4b0d0e471829ff5da46c0f785497624ba36",
".github/ISSUE_TEMPLATE/feature.yml": "b9510f2223104a4f420a3bd52d212512f5613c65ee4cf1efdc83a8fffa1149f8",
".github/ISSUE_TEMPLATE/config.yml": "8b09e7df09fc7534371988062769ee427af2954a02c04c763e8a8005be0f2be4",
".github/pull_request_template.md": "38ee62db634c37469a06d37bfac8c63a8c1592a7fa4c612b8c8206b68ef8b953"
".github/pull_request_template.md": "70d6d0006e6814ed89a8b7487e3ed028c11d957305f154f76fba18706cd31954"
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "lvbt-community-health",
"private": true,
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"packageManager": "pnpm@11.15.1",
"engines": {
"node": ">=24"
},
"scripts": {
"check": "node --test"
"check": "node --test --test-concurrency=1"
}
}
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions tests/community-health.test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { readFile } from 'node:fs/promises';
import { access, readFile } from 'node:fs/promises';
import path from 'node:path';
import test from 'node:test';

Expand All @@ -10,7 +10,8 @@ const read = (file) => readFile(path.join(root, file));
test('published community files match the pinned tooling release', async () => {
const source = JSON.parse(await read('SOURCE.json'));
assert.equal(source.repository, 'LasVegasForTransit/repository-tooling');
assert.equal(source.ref, 'v0.1.1');
assert.equal(source.ref, 'v0.1.3');
assert.equal(source.commit, 'd74383bc14738153114aa0b00f5278470da3fc26');

for (const [file, expected] of Object.entries(source.files)) {
const digest = createHash('sha256').update(await read(file)).digest('hex');
Expand All @@ -26,14 +27,25 @@ test('the pull request template contains only the readable organization outline'

# Overview of Changes

## [subheading if needed]

## [more subheadings if needed]

# Follow-ups

- [ ] Future issue title if needed
`,
);
assert.doesNotMatch(template, /<!--|metadata/i);
});

test('the published-template repository uses TransitMapper’s pnpm contract', async () => {
const packageJson = JSON.parse(await read('package.json'));
const agents = (await read('AGENTS.md')).toString();
const workflow = (await read('.github/workflows/ci.yml')).toString();
const setup = (await read('.github/actions/setup-node-pnpm/action.yml')).toString();

assert.equal(packageJson.packageManager, 'pnpm@11.15.1');
assert.equal(packageJson.scripts.check, 'node --test --test-concurrency=1');
await access(path.join(root, 'pnpm-lock.yaml'));
assert.match(agents, /pnpm check/);
assert.doesNotMatch(agents, /npm run check/);
assert.match(workflow, /uses: \.\/\.github\/actions\/setup-node-pnpm/);
assert.match(workflow, /run: pnpm check/);
assert.match(setup, /pnpm\/action-setup@/);
assert.match(setup, /pnpm install --frozen-lockfile/);
});