|
| 1 | +name: Autograding Tests |
| 2 | +'on': |
| 3 | +- push |
| 4 | +- repository_dispatch |
| 5 | +permissions: |
| 6 | + checks: write |
| 7 | + actions: read |
| 8 | + contents: read |
| 9 | +jobs: |
| 10 | + run-autograding-tests: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + if: github.actor != 'github-classroom[bot]' |
| 13 | + steps: |
| 14 | + - name: Checkout code |
| 15 | + uses: actions/checkout@v4 |
| 16 | + - name: Get value at index |
| 17 | + id: get-value-at-index |
| 18 | + uses: classroom-resources/autograding-command-grader@v1 |
| 19 | + with: |
| 20 | + test-name: Get value at index |
| 21 | + setup-command: '' |
| 22 | + command: "./gradlew test --tests assignment.AppTest.testGet" |
| 23 | + timeout: 1 |
| 24 | + max-score: 1 |
| 25 | + - name: Set value at index |
| 26 | + id: set-value-at-index |
| 27 | + uses: classroom-resources/autograding-command-grader@v1 |
| 28 | + with: |
| 29 | + test-name: Set value at index |
| 30 | + setup-command: '' |
| 31 | + command: "./gradlew test --tests assignment.AppTest.testSet" |
| 32 | + timeout: 1 |
| 33 | + max-score: 1 |
| 34 | + - name: Remove value at index |
| 35 | + id: remove-value-at-index |
| 36 | + uses: classroom-resources/autograding-command-grader@v1 |
| 37 | + with: |
| 38 | + test-name: Remove value at index |
| 39 | + setup-command: '' |
| 40 | + command: "./gradlew test --tests assignment.AppTest.testRemove" |
| 41 | + timeout: 1 |
| 42 | + max-score: 1 |
| 43 | + - name: Reverse LinkedList |
| 44 | + id: reverse-linkedlist |
| 45 | + uses: classroom-resources/autograding-command-grader@v1 |
| 46 | + with: |
| 47 | + test-name: Reverse LinkedList |
| 48 | + setup-command: '' |
| 49 | + command: "./gradlew test --tests assignment.AppTest.testReverse" |
| 50 | + timeout: 1 |
| 51 | + max-score: 1 |
| 52 | + - name: Return whether LinkedList is sorted (true case) |
| 53 | + id: return-whether-linkedlist-is-sorted-true-case |
| 54 | + uses: classroom-resources/autograding-command-grader@v1 |
| 55 | + with: |
| 56 | + test-name: Return whether LinkedList is sorted (true case) |
| 57 | + setup-command: '' |
| 58 | + command: "./gradlew test --tests assignment.AppTest.testIsSortedAscending" |
| 59 | + timeout: 1 |
| 60 | + max-score: 1 |
| 61 | + - name: Return whether LinkedList is sorted (false case) |
| 62 | + id: return-whether-linkedlist-is-sorted-false-case |
| 63 | + uses: classroom-resources/autograding-command-grader@v1 |
| 64 | + with: |
| 65 | + test-name: Return whether LinkedList is sorted (false case) |
| 66 | + setup-command: '' |
| 67 | + command: "./gradlew test --tests assignment.AppTest.testIsSortedAscending2" |
| 68 | + timeout: 1 |
| 69 | + max-score: 1 |
| 70 | + - name: Autograding Reporter |
| 71 | + uses: classroom-resources/autograding-grading-reporter@v1 |
| 72 | + env: |
| 73 | + GET-VALUE-AT-INDEX_RESULTS: "${{steps.get-value-at-index.outputs.result}}" |
| 74 | + SET-VALUE-AT-INDEX_RESULTS: "${{steps.set-value-at-index.outputs.result}}" |
| 75 | + REMOVE-VALUE-AT-INDEX_RESULTS: "${{steps.remove-value-at-index.outputs.result}}" |
| 76 | + REVERSE-LINKEDLIST_RESULTS: "${{steps.reverse-linkedlist.outputs.result}}" |
| 77 | + RETURN-WHETHER-LINKEDLIST-IS-SORTED-TRUE-CASE_RESULTS: "${{steps.return-whether-linkedlist-is-sorted-true-case.outputs.result}}" |
| 78 | + RETURN-WHETHER-LINKEDLIST-IS-SORTED-FALSE-CASE_RESULTS: "${{steps.return-whether-linkedlist-is-sorted-false-case.outputs.result}}" |
| 79 | + with: |
| 80 | + runners: get-value-at-index,set-value-at-index,remove-value-at-index,reverse-linkedlist,return-whether-linkedlist-is-sorted-true-case,return-whether-linkedlist-is-sorted-false-case |
0 commit comments