joininbox/.github/workflows/amd64-image-test.yml
openoms 16fc83f47d
Some checks are pending
amd64-image-build / amd64-image-build (push) Waiting to run
arm64-rpi-image-build / arm64-rpi-image-build (push) Waiting to run
Test Shellcheck / Run Shellcheck (push) Waiting to run
chore: migrate the watch-only Bitcoin Core wallet to use descriptors (#177)
* chore: update wallet creation to use watch-only-descriptor-wallet

* remove duplicate version check

* fix: update release URL in install script and correct typo in wallet import message

* ci: test amd64 image descriptor wallet migration with Bats

* ci: boot amd64 image tests with OVMF pflash

* fix: gate descriptor wallet migration on Bitcoin Core v30

Detect the connected Bitcoin Core version over RPC before migrating.
Keep wallet.dat for v29.x or when the version cannot be determined.

Add regression coverage for both migration and compatibility paths.

* ci: make amd64 image tests independent of guest apt

Inject a pinned bats-core checkout into the temporary VM instead of
installing Bats through the guest package repositories.

Remove the duplicate pull request trigger and simplify artifact lookup.

* ci: harden image build run

* docs(FAQ): how automatic migration works
2026-08-13 11:57:42 +02:00

65 lines
2 KiB
YAML

name: amd64-image-test
concurrency:
group: amd64-image-test-${{ github.event.workflow_run.id || inputs.run_id || github.run_id }}
cancel-in-progress: true
on:
workflow_run:
workflows: ["amd64-image-build"]
types: [completed]
workflow_dispatch:
inputs:
run_id:
description: "amd64-image-build workflow run ID to test"
required: true
type: string
permissions:
actions: read
contents: read
jobs:
bats-image-test:
name: Run Bats against amd64 image artifact
runs-on: ubuntu-22.04
timeout-minutes: 240
if: ${{ github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == github.repository) }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name || github.repository }}
ref: ${{ github.event.workflow_run.head_sha || github.ref }}
- name: Check out bats-core
uses: actions/checkout@v4
with:
repository: bats-core/bats-core
# bats-core v1.12.0
ref: 713504bc0224a19b3d7c7958c18dc07f64f54b44
path: .bats-core
persist-credentials: false
- name: Download amd64 image artifact
uses: actions/download-artifact@v4
with:
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id || inputs.run_id }}
pattern: joininbox-amd64-image-*
path: artifacts
merge-multiple: true
- name: Verify and decompress image
shell: bash
run: |
set -euo pipefail
cd artifacts
sha256sum -c joininbox-amd64-debian.qcow2.gz.sha256
gzip -dk joininbox-amd64-debian.qcow2.gz
sha256sum -c joininbox-amd64-debian.qcow2.sha256
- name: Run image Bats tests
timeout-minutes: 30
run: ci/amd64/test.amd64-image-bats.sh "${GITHUB_WORKSPACE}/artifacts/joininbox-amd64-debian.qcow2"