diff --git a/.github/workflows/classroom.yml b/.github/workflows/classroom.yml index dca83b0..84f3eac 100644 --- a/.github/workflows/classroom.yml +++ b/.github/workflows/classroom.yml @@ -1,19 +1,86 @@ -name: GitHub Classroom Workflow - -on: - - push - - workflow_dispatch - +name: Autograding Tests +'on': +- workflow_dispatch +- repository_dispatch permissions: checks: write actions: read contents: read - jobs: - build: - name: Autograding + run-autograding-tests: runs-on: ubuntu-latest if: github.actor != 'github-classroom[bot]' steps: - - uses: actions/checkout@v4 - - uses: education/autograding@v1 + - name: Checkout code + uses: actions/checkout@v4 + - name: Step 0 Welcome + id: step-0-welcome + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Step 0 Welcome + setup-command: sleep 20 + command: "[ $(cat .github/steps/-step.txt) -ge 1 ] || [ $(cat .github/steps/-step.txt) + = X ]" + timeout: 10 + max-score: 1 + - name: Step 1 Copilot Extension + id: step-1-copilot-extension + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Step 1 Copilot Extension + setup-command: sleep 20 + command: "[ $(cat .github/steps/-step.txt) -ge 1 ] || [ $(cat .github/steps/-step.txt) + = X ]" + timeout: 10 + max-score: 1 + - name: Step 2 javascript + id: step-2-javascript + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Step 2 javascript + setup-command: sleep 20 + command: "[ $(cat .github/steps/-step.txt) -ge 2 ] || [ $(cat .github/steps/-step.txt) + = X ]" + timeout: 10 + max-score: 1 + - name: Step 3 Copilot Hub + id: step-3-copilot-hub + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Step 3 Copilot Hub + setup-command: sleep 20 + command: "[ $(cat .github/steps/-step.txt) -ge 3 ] || [ $(cat .github/steps/-step.txt) + = X ]" + timeout: 10 + max-score: 1 + - name: Step 4 Copilot comment + id: step-4-copilot-comment + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Step 4 Copilot comment + setup-command: sleep 20 + command: "[ $(cat .github/steps/-step.txt) -ge 4 ] || [ $(cat .github/steps/-step.txt) + = X ]" + timeout: 10 + max-score: 1 + - name: Step 5 finish + id: step-5-finish + uses: classroom-resources/autograding-command-grader@v1 + with: + test-name: Step 5 finish + setup-command: sleep 20 + command: "[ $(cat .github/steps/-step.txt) -ge 5 ] || [ $(cat .github/steps/-step.txt) + = X ]" + timeout: 10 + max-score: 1 + - name: Autograding Reporter + uses: classroom-resources/autograding-grading-reporter@v1 + env: + STEP-0-WELCOME_RESULTS: "${{steps.step-0-welcome.outputs.result}}" + STEP-1-COPILOT-EXTENSION_RESULTS: "${{steps.step-1-copilot-extension.outputs.result}}" + STEP-2-JAVASCRIPT_RESULTS: "${{steps.step-2-javascript.outputs.result}}" + STEP-3-COPILOT-HUB_RESULTS: "${{steps.step-3-copilot-hub.outputs.result}}" + STEP-4-COPILOT-COMMENT_RESULTS: "${{steps.step-4-copilot-comment.outputs.result}}" + STEP-5-FINISH_RESULTS: "${{steps.step-5-finish.outputs.result}}" + with: + runners: step-0-welcome,step-1-copilot-extension,step-2-javascript,step-3-copilot-hub,step-4-copilot-comment,step-5-finish