mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Add CI job that detects unused baselines (#54141)
This commit is contained in:
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@@ -202,3 +202,30 @@ jobs:
|
||||
|
||||
- name: Self build
|
||||
run: npx hereby build-src --built
|
||||
|
||||
unused-baselines:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "*"
|
||||
check-latest: true
|
||||
- run: npm ci
|
||||
|
||||
- name: Remove all baselines
|
||||
run: rm -rf tests/baselines/reference
|
||||
|
||||
- name: Run tests
|
||||
run: npm test &> /dev/null || exit 0
|
||||
|
||||
- name: Accept baselines
|
||||
run: npx hereby baseline-accept
|
||||
|
||||
- name: Check for unused baselines
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Unused baselines:"
|
||||
git diff --exit-code --name-only
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user