autograding github action
v4.1.0 ?
مشاريع Autogrades Attogrades GitHub بناءً على مجموعة قابلة للتكوين من المقاييس ويعطي ملاحظات حول طلبات السحب (أو الالتزامات الفردية) في GitHub. أستخدم هذا الإجراء لتصنيف مشاريع الطلاب تلقائيًا في محاضراتي في جامعة ميونيخ للعلوم التطبيقية.
يمكنك رؤية نتائج هذا الإجراء في طلب سحب مثال ويتحقق Github المرتبط من الإخراج. مثال حقيقي آخر مرئي في طلب السحب ويتحقق من نتيجة مشروع طالب مزيف.
يمكن استخدام نتائج الإجراء لإنشاء شارات مختلفة توضح الحالة الحالية للمشروع. يكتب الإجراء نتائج الإجراء إلى ملف يسمى metrics.env في مساحة العمل. يمكن استخدام هذا الملف لإنشاء شارات باستخدام إجراء شارة GitHub. يوضح المقتطف التالي كيفية إنشاء العديد من الشارات لمشروعك ، والمثال الكامل مرئي في سير العمل الخاص بي.
[... Autograding, see above ... ]
- name : Write metrics to GitHub output
id : metrics
run : |
cat metrics.env >> "${GITHUB_OUTPUT}"
mkdir -p badges
- name : Generate the badge SVG image for the line coverage
uses : emibcn/[email protected]
with :
label : ' Line coverage '
status : ${{ steps.metrics.outputs.line }}%
color : ' green '
path : badges/line-coverage.svg
- name : Generate the badge SVG image for the branch coverage
uses : emibcn/[email protected]
with :
label : ' Branch coverage '
status : ${{ steps.metrics.outputs.branch }}%
color : ' green '
path : badges/branch-coverage.svg
- name : Generate the badge SVG image for the mutation coverage
uses : emibcn/[email protected]
with :
label : ' Mutation coverage '
status : ${{ steps.metrics.outputs.mutation }}%
color : ' green '
path : badges/mutation-coverage.svg
- name : Generate the badge SVG image for the style warnings
uses : emibcn/[email protected]
with :
label : ' Style warnings '
status : ${{ steps.metrics.outputs.style }}
color : ' orange '
path : badges/style-warnings.svg
- name : Generate the badge SVG image for the potential bugs
uses : emibcn/[email protected]
with :
label : ' Potential Bugs '
status : ${{ steps.metrics.outputs.bugs }}
color : ' red '
path : badges/bugs.svg
- name : Commit updated badges
continue-on-error : true
run : |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add badges/*.svg
git commit -m "Update badges with results from latest autograding" || true
- name : Push updated badges to GitHub repository
uses : ad-m/github-push-action@master
if : ${{ success() }}
with :
github_token : ${{ secrets.GITHUB_TOKEN }}
branch : main