diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..28c69c6 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,26 @@ +name: Application Tests + +on: + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Set up Python 3.13 + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests + run: | + python -m unittest tests.selenium_tests -v + python -m unittest tests.unit_tests -v \ No newline at end of file diff --git a/app/controllers.py b/app/controllers.py index 3bd086b..3ba72af 100644 --- a/app/controllers.py +++ b/app/controllers.py @@ -47,9 +47,10 @@ def create_new_group( return new_group def check_valid_student(expected_number, student_number, student_id: Optional[str]): + # print(expected_number, student_number, student_id, student_id is not None or student_id != '') if student_number > expected_number: - if student_id is not None: - raise ValueError(f"Student {student_number} should not be provided for a group of {expected_number} members.") + # if student_id is not None or student_id != '': + # raise ValueError(f"Student {student_number} should not be provided for a group of {expected_number} members.") return if not student_id: diff --git a/app/templates/index.html b/app/templates/index.html index 77b8260..329e983 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -44,10 +44,10 @@