mirror of
https://github.com/trailofbits/algo.git
synced 2026-09-03 02:38:46 +02:00
67051d8d35
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/692973e3d937129bcbf40652eb9f2f61becf3332...11bd71901bbe5b1630ceea73d27597364c9af683) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 4.2.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
---
|
|
name: Test Effectiveness Tracking
|
|
|
|
'on':
|
|
schedule:
|
|
- cron: '0 0 * * 0' # Weekly on Sunday
|
|
workflow_dispatch: # Allow manual runs
|
|
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: read
|
|
actions: read
|
|
|
|
jobs:
|
|
track-effectiveness:
|
|
name: Analyze Test Effectiveness
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: true
|
|
|
|
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Analyze test effectiveness
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
python scripts/track-test-effectiveness.py
|
|
|
|
- name: Upload metrics
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: test-effectiveness-metrics
|
|
path: .metrics/
|
|
|
|
- name: Create issue if tests are ineffective
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
# Check if we need to create an issue
|
|
if grep -q "⚠️" .metrics/test-effectiveness-report.md; then
|
|
# Check if issue already exists
|
|
existing=$(gh issue list --label "test-effectiveness" --state open --json number --jq '.[0].number')
|
|
|
|
if [ -z "$existing" ]; then
|
|
gh issue create \
|
|
--title "Test Effectiveness Review Needed" \
|
|
--body-file .metrics/test-effectiveness-report.md \
|
|
--label "test-effectiveness,maintenance"
|
|
else
|
|
# Update existing issue
|
|
gh issue comment $existing --body-file .metrics/test-effectiveness-report.md
|
|
fi
|
|
fi
|
|
|
|
- name: Commit metrics if changed
|
|
run: |
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
|
|
if [[ -n $(git status -s .metrics/) ]]; then
|
|
git add .metrics/
|
|
git commit -m "chore: Update test effectiveness metrics [skip ci]"
|
|
git push
|
|
fi
|