ci: make db-migration arifact part of the workflow inputs (#28604)
* ci: make db-migration arifact part of the workflow inputs * ci: chore cleanup * ci: introduce
This commit is contained in:
parent
d532ee95c1
commit
9ed08706a2
3 changed files with 8 additions and 7 deletions
11
.github/workflows/_base-migration.yml
vendored
11
.github/workflows/_base-migration.yml
vendored
|
|
@ -17,6 +17,9 @@ on:
|
|||
required: false
|
||||
type: number
|
||||
default: 20
|
||||
db-artifact-url:
|
||||
required: false
|
||||
type: string
|
||||
jobs:
|
||||
migration-test:
|
||||
name: Migrate
|
||||
|
|
@ -52,14 +55,14 @@ jobs:
|
|||
${{ inputs.pre }}
|
||||
|
||||
- name: Download database artifact
|
||||
env:
|
||||
DB_ARTIFACT_URL: ${{ inputs.db-artifact-url }}
|
||||
run: |
|
||||
eval "$(tombl -e MIGRATION_DB=tool.frappe-ci.setup.migration-db ${GITHUB_WORKSPACE}/apps/${{ github.event.repository.name }}/pyproject.toml)" || exit 0
|
||||
source ${GITHUB_WORKSPACE}/env/bin/activate
|
||||
wget "$MIGRATION_DB"
|
||||
bench --site test_site --force restore ${GITHUB_WORKSPACE}/$(basename "$MIGRATION_DB")
|
||||
wget "$DB_ARTIFACT_URL"
|
||||
bench --site test_site --force restore ${GITHUB_WORKSPACE}/$(basename "$DB_ARTIFACT_URL")
|
||||
|
||||
function update_to_version() {
|
||||
eval "$(tombl -e FRAPPE_DEPENDENCIES=tool.bench.frappe-dependencies ${GITHUB_WORKSPACE}/apps/${{ github.event.repository.name }}/pyproject.toml)" || true
|
||||
version="$1"
|
||||
if [ -z "$version" ]; then
|
||||
base_ref="${{ github.base_ref || github.ref_name }}"
|
||||
|
|
|
|||
1
.github/workflows/server-tests.yml
vendored
1
.github/workflows/server-tests.yml
vendored
|
|
@ -56,6 +56,7 @@ jobs:
|
|||
needs: checkrun
|
||||
uses: frappe/frappe/.github/workflows/_base-migration.yml@develop
|
||||
with:
|
||||
# db-artifact-url: https://frappeframework.com/files/v13-frappe.sql.gz
|
||||
python-version: '3.10'
|
||||
node-version: 20
|
||||
fake-success: ${{ needs.checkrun.outputs.build != 'strawberry' }}
|
||||
|
|
|
|||
|
|
@ -149,9 +149,6 @@ responses = "==0.23.1"
|
|||
freezegun = "~=1.2.2"
|
||||
pdbpp = "~=0.10.3"
|
||||
|
||||
[tool.frappe-ci.setup]
|
||||
migration-db = "https://frappeframework.com/files/v13-frappe.sql.gz"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 110
|
||||
target-version = "py310"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue