Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .github/.keep
Empty file.
69 changes: 69 additions & 0 deletions .github/workflows/classroom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Autograding Tests
'on':
- 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: Setup
id: setup
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Setup
setup-command: sudo -H pip3 install -qr requirements.txt; sudo -H pip3 install
flake8==5.0.4
command: flake8 --ignore "N801, E203, E266, E501, W503, F812, E741, N803,
N802, N806" minitorch/ tests/ project/; mypy minitorch/*
timeout: 10
max-score: 10
- name: Task 1.1
id: task-1-1
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Task 1.1
setup-command: sudo -H pip3 install -qr requirements.txt
command: pytest -m task1_1
timeout: 10
max-score: 10
- name: Task 1.2
id: task-1-2
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Task 1.2
setup-command: sudo -H pip3 install -qr requirements.txt
command: pytest -m task1_2
timeout: 10
- name: task 1.3
id: task-1-3
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: task 1.3
setup-command: sudo -H pip3 install -qr requirements.txt
command: pytest -m task1_3
timeout: 10
- name: Task 1.4
id: task-1-4
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Task 1.4
setup-command: sudo -H pip3 install -qr requirements.txt
command: pytest -m task1_4
timeout: 10
- name: Autograding Reporter
uses: classroom-resources/autograding-grading-reporter@v1
env:
SETUP_RESULTS: "${{steps.setup.outputs.result}}"
TASK-1-1_RESULTS: "${{steps.task-1-1.outputs.result}}"
TASK-1-2_RESULTS: "${{steps.task-1-2.outputs.result}}"
TASK-1-3_RESULTS: "${{steps.task-1-3.outputs.result}}"
TASK-1-4_RESULTS: "${{steps.task-1-4.outputs.result}}"
with:
runners: setup,task-1-1,task-1-2,task-1-3,task-1-4
45 changes: 45 additions & 0 deletions .github/workflows/minitorch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI (Module 1)

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz
python -m pip install --upgrade pip
pip install flake8 pytest pep8-naming
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# на всякий случай — установить сам пакет
pip install -e .

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 --ignore "N801,E203,E266,E501,W503,W504,F812,F401,F841,E741,N803,N802,N806,E128,E302" minitorch/ tests/ project/

- name: Test with pytest (Module 1)
run: |
echo "Module 1"
pytest tests -q -x -m task1_1
pytest tests -q -x -m task1_2
pytest tests -q -x -m task1_3
pytest tests -q -x -m task1_4
Loading