From 89b5e061af014236bee2e259c88c832b845fdc3b Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Wed, 27 Mar 2024 12:55:46 +0530 Subject: [PATCH] ci: sync up action versions with framework Fixup some tests for py312 Signed-off-by: Akhil Narang --- .github/workflows/patch.yml | 14 +++++++------- .github/workflows/server-tests-mariadb.yml | 18 +++++++++--------- .github/workflows/server-tests-postgres.yml | 14 +++++++------- .../report/gross_profit/test_gross_profit.py | 14 +++++++------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 3514f0d2d985..deca0073b895 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Check for valid Python & Merge Conflicts run: | @@ -43,12 +43,12 @@ jobs: fi - name: Setup Python - uses: "actions/setup-python@v4" + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: 18 check-latest: true @@ -57,7 +57,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} @@ -66,7 +66,7 @@ jobs: ${{ runner.os }}- - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -81,7 +81,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 1e5125eaf755..67f58564342a 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -54,12 +54,12 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Check for valid Python & Merge Conflicts run: | @@ -70,7 +70,7 @@ jobs: fi - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: 18 check-latest: true @@ -79,7 +79,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} @@ -88,7 +88,7 @@ jobs: ${{ runner.os }}- - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -103,7 +103,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} @@ -144,13 +144,13 @@ jobs: if: ${{ github.event_name != 'pull_request' }} steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Download artifacts uses: actions/download-artifact@v3 - name: Upload coverage data - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: name: MariaDB token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/server-tests-postgres.yml b/.github/workflows/server-tests-postgres.yml index a68870665701..7b2d52acd19c 100644 --- a/.github/workflows/server-tests-postgres.yml +++ b/.github/workflows/server-tests-postgres.yml @@ -41,12 +41,12 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - name: Check for valid Python & Merge Conflicts run: | @@ -57,7 +57,7 @@ jobs: fi - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: 18 check-latest: true @@ -66,7 +66,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} @@ -75,7 +75,7 @@ jobs: ${{ runner.os }}- - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -90,7 +90,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/erpnext/accounts/report/gross_profit/test_gross_profit.py b/erpnext/accounts/report/gross_profit/test_gross_profit.py index 741ea46a5167..48096640c746 100644 --- a/erpnext/accounts/report/gross_profit/test_gross_profit.py +++ b/erpnext/accounts/report/gross_profit/test_gross_profit.py @@ -227,7 +227,7 @@ def test_invoice_without_only_delivery_note(self): "gross_profit_%": -50.0, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] - self.assertDictContainsSubset(expected_entry_without_dn, gp_entry[0]) + self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry_without_dn) # make delivery note dn = make_delivery_note(sinv.name) @@ -255,7 +255,7 @@ def test_invoice_without_only_delivery_note(self): "gross_profit_%": 0.0, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] - self.assertDictContainsSubset(expected_entry_with_dn, gp_entry[0]) + self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry_with_dn) def test_bundled_delivery_note_with_different_warehouses(self): """ @@ -386,7 +386,7 @@ def test_order_connected_dn_and_inv(self): "gross_profit_%": -25.0, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] - self.assertDictContainsSubset(expected_entry, gp_entry[0]) + self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry) def test_crnote_against_invoice_with_multiple_instances_of_same_item(self): """ @@ -428,8 +428,8 @@ def test_crnote_against_invoice_with_multiple_instances_of_same_item(self): gp_entry = [x for x in data if x.parent_invoice == sinv.name] # Both items of Invoice should have '0' qty self.assertEqual(len(gp_entry), 2) - self.assertDictContainsSubset(expected_entry, gp_entry[0]) - self.assertDictContainsSubset(expected_entry, gp_entry[1]) + self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry) + self.assertEqual(gp_entry[1], gp_entry[1] | expected_entry) def test_standalone_cr_notes(self): """ @@ -465,7 +465,7 @@ def test_standalone_cr_notes(self): "gross_profit_%": 100.0, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] - self.assertDictContainsSubset(expected_entry, gp_entry[0]) + self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry) def test_different_rates_in_si_and_dn(self): from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order @@ -557,4 +557,4 @@ def test_different_rates_in_si_and_dn(self): "gross_profit_%": 12.5, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] - self.assertDictContainsSubset(expected_entry, gp_entry[0]) + self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry)