Skip to content

Commit 614ef89

Browse files
committed
update classroom.yml
1 parent 23a9e1d commit 614ef89

File tree

1 file changed

+85
-11
lines changed

1 file changed

+85
-11
lines changed

.github/workflows/classroom.yml

Lines changed: 85 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,85 @@
1-
name: GitHub Classroom Workflow
2-
3-
on: [push]
4-
5-
jobs:
6-
build:
7-
name: Autograding
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
- uses: education/autograding@v1
1+
name: Autograding Tests
2+
'on':
3+
- push
4+
- repository_dispatch
5+
permissions:
6+
actions: read
7+
checks: write
8+
contents: read
9+
jobs:
10+
run-autograding-tests:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
- name: Install Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.12'
19+
- id: setup
20+
name: setup
21+
uses: classroom-resources/autograding-command-grader@v1
22+
with:
23+
command: venv/bin/python -m pip install numpy pytest pytest-timeout flake8
24+
pep8-naming flake8-docstrings
25+
max-score: null
26+
setup-command: python3 -m venv venv
27+
test-name: setup
28+
timeout: 1
29+
- id: package-install
30+
name: package-install
31+
uses: classroom-resources/autograding-command-grader@v1
32+
with:
33+
command: venv/bin/python -m pip install -e .
34+
max-score: 1
35+
setup-command: ''
36+
test-name: package-install
37+
timeout: 1
38+
- id: exercise-5-4
39+
name: exercise-5-4
40+
uses: classroom-resources/autograding-command-grader@v1
41+
with:
42+
command: venv/bin/python -m pytest tests/test_exercise_5_4.py
43+
max-score: 1
44+
setup-command: ''
45+
test-name: exercise-5-4
46+
timeout: 1
47+
- id: exercise-5-5
48+
name: exercise-5-5
49+
uses: classroom-resources/autograding-command-grader@v1
50+
with:
51+
command: venv/bin/python -m pytest tests/test_exercise_5_5.py
52+
max-score: 1
53+
setup-command: ''
54+
test-name: exercise-5-5
55+
timeout: 1
56+
- id: exercise-5-6
57+
name: exercise-5-6
58+
uses: classroom-resources/autograding-command-grader@v1
59+
with:
60+
command: venv/bin/python -m pytest tests/test_exercise_5_6.py
61+
max-score: 1
62+
setup-command: ''
63+
test-name: exercise-5-6
64+
timeout: 1
65+
- id: flake8-test
66+
name: flake8-test
67+
uses: classroom-resources/autograding-command-grader@v1
68+
with:
69+
command: venv/bin/python -m flake8 adt_examples/
70+
max-score: 1
71+
setup-command: ''
72+
test-name: flake8-test
73+
timeout: 1
74+
- env:
75+
EXERCISE-5-4: ${{steps.exercise-5-4.outputs.result}}
76+
EXERCISE-5-5: ${{steps.exercise-5-5.outputs.result}}
77+
EXERCISE-5-6: ${{steps.exercise-5-6.outputs.result}}
78+
FLAKE8-TEST: ${{steps.flake8-test.outputs.result}}
79+
PACKAGE-INSTALL: ${{steps.package-install.outputs.result}}
80+
SETUP: ${{steps.setup.outputs.result}}
81+
name: Autograding Reporter
82+
uses: classroom-resources/autograding-grading-reporter@v1
83+
with:
84+
runners: setup, package-install, exercise-5-4, exercise-5-5, exercise-5-6,
85+
flake8-test

0 commit comments

Comments
 (0)