-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2.1 KB
/
Copy pathmastery.yml
File metadata and controls
63 lines (59 loc) · 2.1 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
63
# Generated by scripts/generate-mastery-kits.mjs.
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 Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
- name: Run required checks
id: project_checks
run: node --test test/mastery.test.mjs
- 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 '**CSS Project 2 — Responsive navigation**\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"