From a4be518dd13a383dbae0220e92db06ce2cccd079 Mon Sep 17 00:00:00 2001 From: Anmol Sharma Date: Mon, 18 Mar 2024 18:06:40 +0530 Subject: [PATCH] feat: add a grader to verify and score the submission Signed-off-by: Anmol Sharma feat: try using setup script for grading Signed-off-by: Anmol Sharma feat: remove unnecessary files Signed-off-by: Anmol Sharma chore: remove grader Signed-off-by: Anmol Sharma feat: use custom grading actions v2 Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use latest version of grader Signed-off-by: Anmol Sharma feat: use custome grader action Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma chore: increase passing score to 60 Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma chore: use latest autograder Signed-off-by: Anmol Sharma --- .github/workflows/classroom.yml | 37 +++++++++++++++++++++++++++++++++ .gitignore | 0 test.sh | 4 ++++ 3 files changed, 41 insertions(+) create mode 100644 .github/workflows/classroom.yml create mode 100644 .gitignore create mode 100644 test.sh diff --git a/.github/workflows/classroom.yml b/.github/workflows/classroom.yml new file mode 100644 index 0000000..48740e2 --- /dev/null +++ b/.github/workflows/classroom.yml @@ -0,0 +1,37 @@ +name: Autograding Tests +'on': + - push + - 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: Download mempool + uses: GuillaumeFalourd/clone-github-repo-action@v2.3 + with: + owner: 'SummerOfBitcoin' + repository: 'code-challenge-2024-mempool' + - name: Validate block + id: validate-block + uses: SummerOfBitcoin/code-challenge-2024-grader@v2.8 + with: + test-name: 'Validate block ' + command: chmod +x ./run.sh && ./run.sh + timeout: 10 + max-fee: 20616923 + max-score: 100 + passing-score: 60 + - name: Autograding Reporter + uses: SummerOfBitcoin/autograding-grading-reporter@v2.2 + env: + VALIDATE-BLOCK_RESULTS: "${{steps.validate-block.outputs.result}}" + with: + runners: validate-block diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..75433fd --- /dev/null +++ b/test.sh @@ -0,0 +1,4 @@ +cd ./grader || exit +npm install + +npm run verify-block \ No newline at end of file