77 lines
3.0 KiB
YAML
77 lines
3.0 KiB
YAML
name: Test stale Fleetie-issue scripts
|
|
|
|
# Runs the unit tests for the stale-issue scripts (shared core plus the eng-initiated and
|
|
# Fleetie-initiated wrappers) on PRs that change any script (or its tests), a closer workflow, or
|
|
# this workflow. Handbook edits are deliberately excluded: the scripts are resilient to any
|
|
# handle-shaped content the handbook can realistically contain (denylist, length cap, trailing-hyphen
|
|
# filter, format regex), and the handbook changes often enough that triggering on it would mostly
|
|
# burn CI minutes with no signal.
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/scripts/build-fleetie-handles.js'
|
|
- '.github/scripts/build-fleetie-handles.test.js'
|
|
- '.github/scripts/stale-issues-core.js'
|
|
- '.github/scripts/stale-test-helpers.js'
|
|
- '.github/scripts/stale-eng-issues.js'
|
|
- '.github/scripts/stale-eng-issues.test.js'
|
|
- '.github/scripts/stale-fleetie-issues.js'
|
|
- '.github/scripts/stale-fleetie-issues.test.js'
|
|
- '.github/workflows/close-stale-eng-initiated-issues.yml'
|
|
- '.github/workflows/close-stale-fleetie-initiated-issues.yml'
|
|
- '.github/workflows/test-stale-fleetie-issue-scripts.yml'
|
|
pull_request:
|
|
paths:
|
|
- '.github/scripts/build-fleetie-handles.js'
|
|
- '.github/scripts/build-fleetie-handles.test.js'
|
|
- '.github/scripts/stale-issues-core.js'
|
|
- '.github/scripts/stale-test-helpers.js'
|
|
- '.github/scripts/stale-eng-issues.js'
|
|
- '.github/scripts/stale-eng-issues.test.js'
|
|
- '.github/scripts/stale-fleetie-issues.js'
|
|
- '.github/scripts/stale-fleetie-issues.test.js'
|
|
- '.github/workflows/close-stale-eng-initiated-issues.yml'
|
|
- '.github/workflows/close-stale-fleetie-initiated-issues.yml'
|
|
- '.github/workflows/test-stale-fleetie-issue-scripts.yml'
|
|
workflow_dispatch: # Manual
|
|
|
|
# For PRs, github.head_ref groups by source branch. For pushes (e.g. main), head_ref is empty so
|
|
# we fall back to github.ref so successive pushes to the same branch share a group and
|
|
# cancellation actually applies.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Run tests
|
|
run: node --test .github/scripts/build-fleetie-handles.test.js .github/scripts/stale-eng-issues.test.js .github/scripts/stale-fleetie-issues.test.js
|