Run tests within build workflow (#2882)

This commit is contained in:
Jan Čermák 2023-10-30 15:42:03 +01:00 committed by GitHub
parent 6d7db27f84
commit ae711734bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -242,6 +242,11 @@ jobs:
path: |
output/images/haos_ova*.qcow2.xz
test:
name: Test OS image
needs: [ build, prepare ]
uses: ./.github/workflows/test.yaml
bump_version:
name: Bump ${{ needs.prepare.outputs.channel }} channel version
if: ${{ github.repository == 'home-assistant/operating-system' }}

View File

@ -2,6 +2,7 @@ name: Test HAOS image
run-name: "Test HAOS ${{ inputs.version || format('(OS build #{0})', github.event.workflow_run.run_number) }}"
on:
# Manual test of specified version
workflow_dispatch:
inputs:
version:
@ -9,10 +10,8 @@ on:
required: true
type: string
workflow_run:
workflows: ["OS build"] # must be in sync with build workflow `name`
types:
- completed
# Called by other workflows (e.g. build.yaml)
workflow_call:
jobs:
test:
@ -49,11 +48,9 @@ jobs:
curl -sfL -o haos.qcow2.xz https://os-artifacts.home-assistant.io/${{github.event.inputs.version}}/haos_ova-${{github.event.inputs.version}}.qcow2.xz
- name: Get OS image artifact
if: ${{ github.event_name == 'workflow_run' }}
uses: dawidd6/action-download-artifact@v2
if: ${{ github.event_name == 'workflow_call' }}
uses: actions/download-artifact@v3
with:
workflow: build.yaml
workflow_conclusion: success
name: ova-image
- name: Extract OS image