From d9a97aae87fdd4ecbb82acb5360b74c39707cc5a Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:47:30 +0000 Subject: [PATCH] GitHub Classroom Autograding Workflow --- .github/workflows/classroom.yml | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/classroom.yml diff --git a/.github/workflows/classroom.yml b/.github/workflows/classroom.yml new file mode 100644 index 0000000..8626f4e --- /dev/null +++ b/.github/workflows/classroom.yml @@ -0,0 +1,50 @@ +name: Autograding Tests +'on': +- push +- 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: Functions + id: functions + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Functions + setup-command: npm install + command: npm run test:ci functions/01_naming.test.js + timeout: 10 + max-score: 30 + - name: Callbacks + id: callbacks + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Callbacks + setup-command: npm install + command: npm run test:ci functions/02_callbacks.test.js + timeout: 10 + max-score: 30 + - name: Promises + id: promises + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Promises + setup-command: npm install + command: npm run test:ci promises + timeout: 10 + max-score: 40 + - name: Autograding Reporter + uses: classroom-resources/autograding-grading-reporter@v1 + env: + FUNCTIONS_RESULTS: "${{steps.functions.outputs.result}}" + CALLBACKS_RESULTS: "${{steps.callbacks.outputs.result}}" + PROMISES_RESULTS: "${{steps.promises.outputs.result}}" + with: + runners: functions,callbacks,promises