Initial commit #1
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
name: Autograding Tests | |
'on': | |
- push | |
- 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: Code Verification | |
uses: actions/checkout@v4 | |
- name: Foundry Installation | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Forge Installation | |
run: | | |
cd hw | |
forge install | |
id: test | |
## Problem Template | |
# - name: Problem <id> | |
# id: problem-<id> | |
# uses: classroom-resources/autograding-command-grader@v1 | |
# with: | |
# test-name: Problem <id> | |
# command: cd hw && forge test --mt <foundry-test-name> | |
# timeout: <time-limit> | |
# max-score: <max-score> | |
## Modify Problem 1 Configuration | |
- name: Problem 1 | |
id: problem-1 | |
uses: classroom-resources/autograding-command-grader@v1 | |
with: | |
test-name: Problem 1 | |
command: cd hw && forge test --mt test_Increment | |
timeout: 10 | |
max-score: 10 | |
## Modify Problem 2 Configuration | |
- name: Problem 2 | |
id: problem-2 | |
uses: classroom-resources/autograding-command-grader@v1 | |
with: | |
test-name: Problem 2 | |
command: cd hw && forge test --mt testFuzz_SetNumber | |
timeout: 10 | |
max-score: 10 | |
## Add More Problem Below | |
## Problem 3 ... | |
## Problem 4 ... | |
## Modify Autograding Reporter | |
## If new problems are added, remember to add new grading actions below | |
- name: Autograding Reporter | |
uses: classroom-resources/autograding-grading-reporter@v1 | |
env: | |
PROBLEM-1_RESULTS: "${{steps.problem-1.outputs.result}}" | |
PROBLEM-2_RESULTS: "${{steps.problem-2.outputs.result}}" | |
with: | |
runners: problem-1, problem-2 |