Skip to content

Autograding Tests

Autograding Tests #1

Workflow file for this run

name: Autograding Tests
'on':
- workflow_dispatch
- repository_dispatch
permissions:
checks: write
actions: read
contents: read
jobs:
run-autograding-tests:
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Backend List Teachers
id: backend-list-teachers
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend List Teachers
setup-command: npm install
command: npm test -- -t "GET /listTeachers should show all teachers"
timeout: 10
max-score: 10
- name: Backend Add Teacher
id: backend-add-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend Add Teacher
setup-command: npm install
command: npm test -- -t "POST /addTeacher should show a newly added teacher"
timeout: 10
max-score: 10
- name: Backend Edit Teacher
id: backend-edit-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend Edit Teacher
setup-command: npm install
command: npm test -- -t "POST /editTeacher should show a newly added teacher"
timeout: 10
max-score: 10
- name: Backend Delete Teacher
id: backend-delete-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend Delete Teacher
setup-command: npm install
command: npm test -- -t "POST /deleteTeacher should delete a teacher"
timeout: 10
max-score: 10
- name: Backend List Students
id: backend-list-students
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend List Students
setup-command: npm install
command: npm test -- -t "GET /listStudents should show all students"
timeout: 10
max-score: 10
- name: Backend Add Student
id: backend-add-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend Add Student
setup-command: npm install
command: npm test -- -t "POST /addStudent should show a newly added student"
timeout: 10
max-score: 10
- name: Backend Edit Student
id: backend-edit-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend Edit Student
setup-command: npm install
command: npm test -- -t "POST /editStudent should edit a Student"
timeout: 10
max-score: 10
- name: Backend Delete Student
id: backend-delete-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Backend Delete Student
setup-command: npm install
command: npm test -- -t "POST /deleteStudent should delete a student"
timeout: 10
max-score: 10
- name: Dummy Test
id: dummy-test
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Dummy Test
setup-command: npm install
command: file=./test/dummy.test.js npm run test --prefix ./frontend
timeout: 10
- name: Frontend Add Student
id: frontend-add-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Add Student
setup-command: npm install
command: file=./test/student-add.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Delete Student
id: frontend-delete-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Delete Student
setup-command: npm install
command: file=./test/student-delete.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Edit Student
id: frontend-edit-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Edit Student
setup-command: npm install
command: file=./test/student-edit.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Search Student
id: frontend-search-student
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Search Student
setup-command: npm install
command: file=./test/student-search.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Add Teacher
id: frontend-add-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Add Teacher
setup-command: npm install
command: file=./test/teacher-add.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Delete Teacher
id: frontend-delete-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Delete Teacher
setup-command: npm install
command: file=./test/teacher-delete.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Edit Teacher
id: frontend-edit-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Edit Teacher
setup-command: npm install
command: file=./test/teacher-edit.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Frontend Search Teacher
id: frontend-search-teacher
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Frontend Search Teacher
setup-command: npm install
command: file=./test/teacher-search.test.js npm run test --prefix ./frontend
timeout: 10
max-score: 10
- name: Autograding Reporter
uses: classroom-resources/autograding-grading-reporter@v1
env:
BACKEND-LIST-TEACHERS_RESULTS: "${{steps.backend-list-teachers.outputs.result}}"
BACKEND-ADD-TEACHER_RESULTS: "${{steps.backend-add-teacher.outputs.result}}"
BACKEND-EDIT-TEACHER_RESULTS: "${{steps.backend-edit-teacher.outputs.result}}"
BACKEND-DELETE-TEACHER_RESULTS: "${{steps.backend-delete-teacher.outputs.result}}"
BACKEND-LIST-STUDENTS_RESULTS: "${{steps.backend-list-students.outputs.result}}"
BACKEND-ADD-STUDENT_RESULTS: "${{steps.backend-add-student.outputs.result}}"
BACKEND-EDIT-STUDENT_RESULTS: "${{steps.backend-edit-student.outputs.result}}"
BACKEND-DELETE-STUDENT_RESULTS: "${{steps.backend-delete-student.outputs.result}}"
DUMMY-TEST_RESULTS: "${{steps.dummy-test.outputs.result}}"
FRONTEND-ADD-STUDENT_RESULTS: "${{steps.frontend-add-student.outputs.result}}"
FRONTEND-DELETE-STUDENT_RESULTS: "${{steps.frontend-delete-student.outputs.result}}"
FRONTEND-EDIT-STUDENT_RESULTS: "${{steps.frontend-edit-student.outputs.result}}"
FRONTEND-SEARCH-STUDENT_RESULTS: "${{steps.frontend-search-student.outputs.result}}"
FRONTEND-ADD-TEACHER_RESULTS: "${{steps.frontend-add-teacher.outputs.result}}"
FRONTEND-DELETE-TEACHER_RESULTS: "${{steps.frontend-delete-teacher.outputs.result}}"
FRONTEND-EDIT-TEACHER_RESULTS: "${{steps.frontend-edit-teacher.outputs.result}}"
FRONTEND-SEARCH-TEACHER_RESULTS: "${{steps.frontend-search-teacher.outputs.result}}"
with:
runners: backend-list-teachers,backend-add-teacher,backend-edit-teacher,backend-delete-teacher,backend-list-students,backend-add-student,backend-edit-student,backend-delete-student,dummy-test,frontend-add-student,frontend-delete-student,frontend-edit-student,frontend-search-student,frontend-add-teacher,frontend-delete-teacher,frontend-edit-teacher,frontend-search-teacher