|
| 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: test1-2 |
| 17 | + id: test1-2 |
| 18 | + uses: classroom-resources/autograding-io-grader@v1 |
| 19 | + with: |
| 20 | + test-name: test1-2 |
| 21 | + setup-command: cd Task1_2 && chmod +x ./bash-calc && chmod +x ./malware && cd .. |
| 22 | + command: cd Task1_2 && python3 payload.py > payload && ./bash-calc < payload; echo "" |
| 23 | + input: '' |
| 24 | + expected-output: You have successfully detonated the bomb! Congratulations! |
| 25 | + comparison-method: contains |
| 26 | + timeout: 10 |
| 27 | + max-score: 10 |
| 28 | + - name: task3-1 |
| 29 | + id: task3-1 |
| 30 | + uses: classroom-resources/autograding-io-grader@v1 |
| 31 | + with: |
| 32 | + test-name: task3-1 |
| 33 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 34 | + command: cd Task3 && ./program |
| 35 | + input: '' |
| 36 | + expected-output: |- |
| 37 | + test1 PASSED |
| 38 | + comparison-method: contains |
| 39 | + timeout: 10 |
| 40 | + max-score: 10 |
| 41 | + - name: task3-2 |
| 42 | + id: task3-2 |
| 43 | + uses: classroom-resources/autograding-io-grader@v1 |
| 44 | + with: |
| 45 | + test-name: task3-2 |
| 46 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 47 | + command: cd Task3 && ./program |
| 48 | + input: '' |
| 49 | + expected-output: |- |
| 50 | + test2 PASSED |
| 51 | + comparison-method: contains |
| 52 | + timeout: 10 |
| 53 | + max-score: 10 |
| 54 | + - name: task3-3 |
| 55 | + id: task3-3 |
| 56 | + uses: classroom-resources/autograding-io-grader@v1 |
| 57 | + with: |
| 58 | + test-name: task3-3 |
| 59 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 60 | + command: cd Task3 && ./program |
| 61 | + input: '' |
| 62 | + expected-output: |- |
| 63 | + test3 PASSED |
| 64 | + comparison-method: contains |
| 65 | + timeout: 10 |
| 66 | + max-score: 10 |
| 67 | + - name: task3-4 |
| 68 | + id: task3-4 |
| 69 | + uses: classroom-resources/autograding-io-grader@v1 |
| 70 | + with: |
| 71 | + test-name: task3-4 |
| 72 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 73 | + command: cd Task3 && ./program |
| 74 | + input: '' |
| 75 | + expected-output: |- |
| 76 | + test4 PASSED |
| 77 | + comparison-method: contains |
| 78 | + timeout: 10 |
| 79 | + max-score: 10 |
| 80 | + - name: task3-5 |
| 81 | + id: task3-5 |
| 82 | + uses: classroom-resources/autograding-io-grader@v1 |
| 83 | + with: |
| 84 | + test-name: task3-5 |
| 85 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 86 | + command: cd Task3 && ./program |
| 87 | + input: '' |
| 88 | + expected-output: |- |
| 89 | + test5 PASSED |
| 90 | + comparison-method: contains |
| 91 | + timeout: 10 |
| 92 | + max-score: 10 |
| 93 | + - name: task3-6 |
| 94 | + id: task3-6 |
| 95 | + uses: classroom-resources/autograding-io-grader@v1 |
| 96 | + with: |
| 97 | + test-name: task3-6 |
| 98 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 99 | + command: cd Task3 && ./program |
| 100 | + input: '' |
| 101 | + expected-output: |- |
| 102 | + test6 PASSED |
| 103 | + comparison-method: contains |
| 104 | + timeout: 10 |
| 105 | + max-score: 10 |
| 106 | + - name: task3-7 |
| 107 | + id: task3-7 |
| 108 | + uses: classroom-resources/autograding-io-grader@v1 |
| 109 | + with: |
| 110 | + test-name: task3-7 |
| 111 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 112 | + command: cd Task3 && ./program |
| 113 | + input: '' |
| 114 | + expected-output: |- |
| 115 | + test7 PASSED |
| 116 | + comparison-method: contains |
| 117 | + timeout: 10 |
| 118 | + max-score: 10 |
| 119 | + - name: task3-8 |
| 120 | + id: task3-8 |
| 121 | + uses: classroom-resources/autograding-io-grader@v1 |
| 122 | + with: |
| 123 | + test-name: task3-8 |
| 124 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 125 | + command: cd Task3 && ./program |
| 126 | + input: '' |
| 127 | + expected-output: |- |
| 128 | + test8 PASSED |
| 129 | + comparison-method: contains |
| 130 | + timeout: 10 |
| 131 | + max-score: 10 |
| 132 | + - name: task3-progress_bar |
| 133 | + id: task3-progress_bar |
| 134 | + uses: classroom-resources/autograding-io-grader@v1 |
| 135 | + with: |
| 136 | + test-name: task3-progress_bar |
| 137 | + setup-command: cd Task3 && make clean && make all && chmod +x ./program && cd .. |
| 138 | + command: cd Task3 && ./program |
| 139 | + input: '' |
| 140 | + expected-output: |- |
| 141 | + progress bar SHOWN |
| 142 | + comparison-method: contains |
| 143 | + timeout: 10 |
| 144 | + max-score: 10 |
| 145 | + - name: Autograding Reporter |
| 146 | + uses: classroom-resources/autograding-grading-reporter@v1 |
| 147 | + env: |
| 148 | + TEST1-2_RESULTS: "${{steps.test1-2.outputs.result}}" |
| 149 | + TASK3-1_RESULTS: "${{steps.task3-1.outputs.result}}" |
| 150 | + TASK3-2_RESULTS: "${{steps.task3-2.outputs.result}}" |
| 151 | + TASK3-3_RESULTS: "${{steps.task3-3.outputs.result}}" |
| 152 | + TASK3-4_RESULTS: "${{steps.task3-4.outputs.result}}" |
| 153 | + TASK3-5_RESULTS: "${{steps.task3-5.outputs.result}}" |
| 154 | + TASK3-6_RESULTS: "${{steps.task3-6.outputs.result}}" |
| 155 | + TASK3-7_RESULTS: "${{steps.task3-7.outputs.result}}" |
| 156 | + TASK3-8_RESULTS: "${{steps.task3-8.outputs.result}}" |
| 157 | + TASK3-PROGRESS_BAR_RESULTS: "${{steps.task3-progress_bar.outputs.result}}" |
| 158 | + with: |
| 159 | + runners: test1-2,task3-1,task3-2,task3-3,task3-4,task3-5,task3-6,task3-7,task3-8,task3-progress_bar |
0 commit comments