Skip to content

Commit

Permalink
ci: sync up action versions with framework
Browse files Browse the repository at this point in the history
Fixup some tests for py312

Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang committed Mar 27, 2024
1 parent 54cd492 commit 89b5e06
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check for valid Python & Merge Conflicts
run: |
Expand All @@ -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
Expand All @@ -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') }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/server-tests-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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') }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/server-tests-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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') }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
14 changes: 7 additions & 7 deletions erpnext/accounts/report/gross_profit/test_gross_profit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 89b5e06

Please sign in to comment.