mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-07-02 03:01:45 +02:00
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
name: Squad Preview Validation
|
|
|
|
on:
|
|
push:
|
|
branches: [preview]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Validate version consistency
|
|
run: |
|
|
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
if ! grep -q "## \[$VERSION\]" CHANGELOG.md 2>/dev/null; then
|
|
echo "::error::Version $VERSION not found in CHANGELOG.md — update CHANGELOG.md before release"
|
|
exit 1
|
|
fi
|
|
echo "✅ Version $VERSION validated in CHANGELOG.md"
|
|
|
|
- name: Run tests
|
|
run: node --test test/*.test.js
|
|
|
|
- name: Check no .ai-team/ or .squad/ files are tracked
|
|
run: |
|
|
FOUND_FORBIDDEN=0
|
|
if git ls-files --error-unmatch .ai-team/ 2>/dev/null; then
|
|
echo "::error::❌ .ai-team/ files are tracked on preview — this must not ship."
|
|
FOUND_FORBIDDEN=1
|
|
fi
|
|
if git ls-files --error-unmatch .squad/ 2>/dev/null; then
|
|
echo "::error::❌ .squad/ files are tracked on preview — this must not ship."
|
|
FOUND_FORBIDDEN=1
|
|
fi
|
|
if [ $FOUND_FORBIDDEN -eq 1 ]; then
|
|
exit 1
|
|
fi
|
|
echo "✅ No .ai-team/ or .squad/ files tracked — clean for release."
|
|
|
|
- name: Validate package.json version
|
|
run: |
|
|
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
if [ -z "$VERSION" ]; then
|
|
echo "::error::❌ No version field found in package.json."
|
|
exit 1
|
|
fi
|
|
echo "✅ package.json version: $VERSION"
|