ci: 依存パッケージの破損を検知する定期チェックを追加

This commit is contained in:
nrslib 2026-02-20 13:49:18 +09:00
parent 76a65e7c0e
commit 192077cea8

47
.github/workflows/dependency-check.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Dependency Health Check
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
fresh-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install without lockfile
run: |
rm package-lock.json
npm install
- name: Build
run: npm run build
- name: Verify CLI startup
run: node bin/takt --version
- name: Notify Slack on failure
if: failure()
uses: slackapi/slack-github-action@v2.0.0
with:
webhook-type: incoming-webhook
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
payload: |
{
"text": "⚠️ Dependency health check failed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*⚠️ Dependency Health Check Failed*\nA dependency may have published a broken version.\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>"
}
}
]
}