-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Classroom Autograding Workflow
- Loading branch information
1 parent
d413be7
commit cdf7c40
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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: Step 1 Create a Branch | ||
id: step-1-create-a-branch | ||
uses: classroom-resources/autograding-command-grader@v1 | ||
with: | ||
test-name: Step 1 Create a Branch | ||
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 Commit a File | ||
id: step-2-commit-a-file | ||
uses: classroom-resources/autograding-command-grader@v1 | ||
with: | ||
test-name: Step 2 Commit a File | ||
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 Open a Pull Request | ||
id: step-3-open-a-pull-request | ||
uses: classroom-resources/autograding-command-grader@v1 | ||
with: | ||
test-name: Step 3 Open a Pull Request | ||
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 Merge Your Pull Request | ||
id: step-4-merge-your-pull-request | ||
uses: classroom-resources/autograding-command-grader@v1 | ||
with: | ||
test-name: Step 4 Merge Your Pull Request | ||
setup-command: sleep 20 | ||
command: "[ $(cat .github/steps/-step.txt) -ge 4 ] || [ $(cat .github/steps/-step.txt) | ||
= X ]" | ||
timeout: 10 | ||
max-score: 1 | ||
- name: Autograding Reporter | ||
uses: classroom-resources/autograding-grading-reporter@v1 | ||
env: | ||
STEP-1-CREATE-A-BRANCH_RESULTS: "${{steps.step-1-create-a-branch.outputs.result}}" | ||
STEP-2-COMMIT-A-FILE_RESULTS: "${{steps.step-2-commit-a-file.outputs.result}}" | ||
STEP-3-OPEN-A-PULL-REQUEST_RESULTS: "${{steps.step-3-open-a-pull-request.outputs.result}}" | ||
STEP-4-MERGE-YOUR-PULL-REQUEST_RESULTS: "${{steps.step-4-merge-your-pull-request.outputs.result}}" | ||
with: | ||
runners: step-1-create-a-branch,step-2-commit-a-file,step-3-open-a-pull-request,step-4-merge-your-pull-request |