Skip to content

Commit

Permalink
Merge pull request #227 from RitvikSardana/develop-ritvik-patch-so-si…
Browse files Browse the repository at this point in the history
…-option

feat: Option for user to create Sales Order Instead of Sales Invoice for generating fees
  • Loading branch information
RitvikSardana authored Apr 1, 2024
2 parents 552b398 + e4a2622 commit 03c1260
Show file tree
Hide file tree
Showing 71 changed files with 1,475 additions and 1,059 deletions.
3 changes: 3 additions & 0 deletions .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ sed -i 's/schedule:/# schedule:/g' Procfile
sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile

bench get-app payments --branch ${BRANCH_TO_CLONE%"-hotfix"}
bench get-app https://github.com/frappe/erpnext --branch "$BRANCH_TO_CLONE" --resolve-deps
bench get-app education "${GITHUB_WORKSPACE}"
bench setup requirements --dev
bench build

bench start &>> ~/frappe-bench/bench_start.log &
CI=Yes bench build --app frappe &
bench --site test_site reinstall --yes

bench --verbose --site test_site install-app payments
bench --verbose --site test_site install-app education
38 changes: 32 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# Run everday at midnight UTC / 5:30 IST
- cron: "0 0 * * *"
env:
EDUCATION_BRANCH: ${{ github.base_ref || github.ref_name }}
EDUCATION_BRANCH: ${{ github.base_ref || github.ref_name }}

concurrency:
group: develop-${{ github.event.number }}
Expand All @@ -28,16 +28,13 @@ jobs:
strategy:
fail-fast: false

matrix:
container: [1, 2]

name: Python Unit Tests

services:
mysql:
image: mariadb:10.6
env:
MARIADB_ROOT_PASSWORD: 'root'
MARIADB_ROOT_PASSWORD: "root"
ports:
- 3306:3306
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
Expand All @@ -49,7 +46,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: "3.10"

- name: Check for valid Python & Merge Conflicts
run: |
Expand Down Expand Up @@ -77,9 +74,38 @@ jobs:
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: |
bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
env:
BRANCH_TO_CLONE: ${{ env.EDUCATION_BRANCH }}

- name: Run Tests
run: cd ~/frappe-bench/ && bench --site test_site run-tests --app education
env:
TYPE: server
CI_BUILD_ID: ${{ github.run_id }}
2 changes: 1 addition & 1 deletion education/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "15.2.1"
__version__ = "15.3.0"
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt

import unittest
from frappe.tests.utils import FrappeTestCase

# test_records = frappe.get_test_records('Academic Term')


class TestAcademicTerm(unittest.TestCase):
class TestAcademicTerm(FrappeTestCase):
pass
27 changes: 0 additions & 27 deletions education/education/doctype/academic_term/test_records.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt

import unittest

import frappe
from frappe.tests.utils import FrappeTestCase


class TestAcademicYear(unittest.TestCase):
class TestAcademicYear(FrappeTestCase):
def test_date_validation(self):
year = frappe.get_doc(
{
Expand Down
18 changes: 0 additions & 18 deletions education/education/doctype/academic_year/test_records.json

This file was deleted.

5 changes: 3 additions & 2 deletions education/education/doctype/article/test_article.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

class TestArticle(unittest.TestCase):

class TestArticle(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

# test_records = frappe.get_test_records('Assessment Criteria')


class TestAssessmentCriteria(unittest.TestCase):
class TestAssessmentCriteria(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[
{
"assessment_criteria": "_Test Assessment Criteria"
},
{
"assessment_criteria": "_Test Assessment Criteria 1"
}
]
{
"assessment_criteria": "_Test Assessment Criteria"
},
{
"assessment_criteria": "_Test Assessment Criteria 1"
}
]
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

# test_records = frappe.get_test_records('Assessment Criteria Group')


class TestAssessmentCriteriaGroup(unittest.TestCase):
class TestAssessmentCriteriaGroup(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

# test_records = frappe.get_test_records('Assessment Group')


class TestAssessmentGroup(unittest.TestCase):
class TestAssessmentGroup(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

# test_records = frappe.get_test_records('Assessment Plan')


class TestAssessmentPlan(unittest.TestCase):
class TestAssessmentPlan(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest
import frappe
from frappe.tests.utils import FrappeTestCase

from education.education.api import get_grade
from education.education.test_utils import create_grading_scale

# test_records = frappe.get_test_records('Assessment Result')


class TestAssessmentResult(unittest.TestCase):
class TestAssessmentResult(FrappeTestCase):
def setUp(self):
create_grading_scale()

def tearDown(self):
frappe.db.rollback()

def test_grade(self):
grade = get_grade("_Test Grading Scale", 80)
self.assertEqual("A", grade)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

class TestAssessmentResultTool(unittest.TestCase):

class TestAssessmentResultTool(FrappeTestCase):
pass
8 changes: 5 additions & 3 deletions education/education/doctype/course/test_course.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt

import unittest

import frappe

from education.education.doctype.topic.test_topic import (
make_topic, make_topic_and_linked_content)
make_topic,
make_topic_and_linked_content,
)
from frappe.tests.utils import FrappeTestCase

# test_records = frappe.get_test_records('Course')


class TestCourse(unittest.TestCase):
class TestCourse(FrappeTestCase):
def setUp(self):
make_topic_and_linked_content(
"_Test Topic 1", [{"type": "Article", "name": "_Test Article 1"}]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

import unittest

from frappe.tests.utils import FrappeTestCase

import frappe


class TestCourseActivity(unittest.TestCase):
class TestCourseActivity(FrappeTestCase):
pass


Expand Down
Loading

0 comments on commit 03c1260

Please sign in to comment.