-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 2.04 KB
/
Copy pathmastery.yml
File metadata and controls
62 lines (58 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Automated project grade
on:
push:
branches-ignore:
- main
pull_request:
branches:
- main
concurrency:
group: mastery-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
jobs:
grade:
name: Automated project grade
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out learner revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Use Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Run required checks
id: project_checks
run: python3 -B -I tests/run_tests.py
- name: Publish grade summary
if: ${{ always() }}
shell: bash
env:
CHECK_OUTCOME: ${{ steps.project_checks.outcome }}
run: |
case "$CHECK_OUTCOME" in
success)
heading='✅ PASS — NAILED IT'
message='Every required automated check passed for this commit.'
;;
failure)
heading='❌ REVISE — KEEP BUILDING'
message='Open the failed check output, make the smallest correction, and push again.'
;;
*)
heading='⚠️ GRADE DID NOT COMPLETE'
message='Inspect the setup and check logs, then push a new attempt-branch commit.'
;;
esac
{
printf '## %s\n\n' "$heading"
printf '**Study Session Planner**\n\n'
printf -- '- Result: `%s`\n' "$CHECK_OUTCOME"
printf -- '- Commit: `%s`\n\n' "$GITHUB_SHA"
printf '%s\n\n' "$message"
printf 'Optional real-use and explain-back prompts remain in MASTERY.md for extra practice; no reviewer is required for this automated grade.\n'
} >> "$GITHUB_STEP_SUMMARY"