Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
// Dev container for the Forge SWEXP starter repo.
// Open in GitHub Codespaces (Code -> Codespaces -> Create) or VS Code Dev Containers
// for a zero-setup environment with Git, the right runtime, and the gh CLI preinstalled.
// Then follow README.md / Lesson_00.md to pick up your first ticket.
// Then follow README.md to pick up your first exercise.
{
"name": "SWEXP 10 AI Software Engineering",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postCreateCommand": "echo '\\n=== Forge SWEXP environment ready ==='; git --version; node --version 2>/dev/null; echo 'Open README.md, then Lesson_00.md to begin.'",
"postCreateCommand": "npm install && echo '\\n=== Forge SWEXP environment ready ==='; git --version; node --version 2>/dev/null; echo 'Open README.md, then pick an exercise under labs/ to begin.'",
"customizations": {
"vscode": {
"extensions": [
"yzhang.markdown-all-in-one"
"yzhang.markdown-all-in-one",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
},
"remoteUser": "node"
}
}
60 changes: 60 additions & 0 deletions .github/workflows/autograde.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Autograde

on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
grade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run autograder
id: grade
continue-on-error: true
run: npm run grade

- name: Publish score to job summary
if: always()
run: cat grade-report.md >> "$GITHUB_STEP_SUMMARY" || true

- name: Comment score on pull request
if: always() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const marker = '<!-- swexp-autograde -->';
let body = marker + '\n';
try { body += fs.readFileSync('grade-report.md', 'utf8'); }
catch { body += 'Autograder did not produce a report.'; }
const { owner, repo } = context.repo;
const issue_number = context.issue.number;
const { data: comments } = await github.rest.issues.listComments({ owner, repo, issue_number });
const existing = comments.find(c => c.body && c.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({ owner, repo, comment_id: existing.id, body });
} else {
await github.rest.issues.createComment({ owner, repo, issue_number, body });
}

- name: Fail the check if incomplete
if: steps.grade.outcome != 'success'
run: |
echo "Exercises are not yet complete — see the autograde summary above."
exit 1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.DS_Store
node_modules/
.grade/
grade-report.md
dist/
coverage/
35 changes: 0 additions & 35 deletions LEARNER_GUIDE.md

This file was deleted.

98 changes: 0 additions & 98 deletions Lesson_00.md

This file was deleted.

Loading
Loading