From db27251239f59c0d0b54d0999f7620754013b1f2 Mon Sep 17 00:00:00 2001 From: Krasimir Date: Mon, 25 Nov 2024 12:18:44 +0100 Subject: [PATCH] done --- .github/workflows/classroom.yml | 50 +++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/.github/workflows/classroom.yml b/.github/workflows/classroom.yml index b5023b4..cf33efb 100644 --- a/.github/workflows/classroom.yml +++ b/.github/workflows/classroom.yml @@ -1,7 +1,7 @@ name: Autograding Tests 'on': -- push -- repository_dispatch + - push + - repository_dispatch permissions: checks: write actions: read @@ -13,44 +13,76 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + - name: Matrix output test id: matrix-output-test uses: classroom-resources/autograding-command-grader@v1 with: test-name: Matrix output test - setup-command: '' + setup-command: make clean && make command: make test timeout: 10 max-score: 2 + + - name: Debug No Args Test + run: | + echo "Debugging No Args Test:" + echo "Running: ./assignment" + ./assignment + echo "Exit Code: $?" + - name: No args test id: no-args-test uses: classroom-resources/autograding-command-grader@v1 with: test-name: No args test setup-command: chmod +x checkargs.sh - command: ./checkargs.sh "./assignment" "Incorrect usage. You provided 0 arguments. - The correct number of arguments is 2" + command: ./checkargs.sh "./assignment" "Incorrect usage. You provided 0 arguments. The correct number of arguments is 2" timeout: 10 max-score: 1 + + - name: Debug One Arg Test + run: | + echo "Debugging One Arg Test:" + echo "Running: ./assignment 1" + ./assignment 1 + echo "Exit Code: $?" + - name: One arg test id: one-arg-test uses: classroom-resources/autograding-command-grader@v1 with: test-name: One arg test setup-command: chmod +x checkargs.sh - command: ./checkargs.sh "./assignment 1" "Incorrect usage. You provided 1 - arguments. The correct number of arguments is 2" + command: ./checkargs.sh "./assignment 1" "Incorrect usage. You provided 1 arguments. The correct number of arguments is 2" timeout: 10 max-score: 1 + + - name: Debug Three Args Test + run: | + echo "Debugging Three Args Test:" + echo "Running: ./assignment 1 2 3" + ./assignment 1 2 3 + echo "Exit Code: $?" + - name: Three args test id: three-args-test uses: classroom-resources/autograding-command-grader@v1 with: test-name: Three args test setup-command: chmod +x checkargs.sh - command: ./checkargs.sh "./assignment 1 2 3" "Incorrect usage. You provided - 3 arguments. The correct number of arguments is 2" + command: ./checkargs.sh "./assignment 1 2 3" "Incorrect usage. You provided 3 arguments. The correct number of arguments is 2" timeout: 10 + + - name: Debug Matrix Output Test + run: | + echo "Debugging Matrix Output Test:" + echo "Running: ./assignment 5 10" + ./assignment 5 10 + echo "Exit Code: $?" + echo "Contents of matrix.txt:" + cat matrix.txt || echo "matrix.txt not found" + - name: Autograding Reporter uses: classroom-resources/autograding-grading-reporter@v1 env: