ci: sync up action versions with framework
Fixup some tests for py312
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml
index 3514f0d..deca007 100644
--- a/.github/workflows/patch.yml
+++ b/.github/workflows/patch.yml
@@ -32,7 +32,7 @@
steps:
- name: Clone
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Check for valid Python & Merge Conflicts
run: |
@@ -43,12 +43,12 @@
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 @@
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 @@
${{ 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 @@
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 1e5125e..67f5856 100644
--- a/.github/workflows/server-tests-mariadb.yml
+++ b/.github/workflows/server-tests-mariadb.yml
@@ -54,12 +54,12 @@
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 @@
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 @@
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 @@
${{ 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 @@
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 @@
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 a688706..7b2d52a 100644
--- a/.github/workflows/server-tests-postgres.yml
+++ b/.github/workflows/server-tests-postgres.yml
@@ -41,12 +41,12 @@
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 @@
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 @@
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 @@
${{ 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 @@
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 741ea46..4809664 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 @@
"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 @@
"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 @@
"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 @@
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 @@
"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 @@
"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)