Skip to content

lf-edge/eden Test suite #17500

lf-edge/eden Test suite

lf-edge/eden Test suite #17500

Workflow file for this run

---
name: lf-edge/eden Test suite
# yamllint disable-line rule:truthy
on:
push:
branches:
- "master"
- "[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+-stable"
paths-ignore:
- 'docs/**'
- 'pkg/pillar/docs/**'
pull_request_review:
types: [submitted]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
get-run-id:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
outputs:
result: ${{ steps.get-run-id.outputs.result }}
steps:
- name: Get run ID for the artifact upload
id: get-run-id
uses: actions/github-script@v7
with:
script: |
const { data } = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build.yml',
head_sha: context.payload.pull_request.head.sha,
status: 'success'
});
if (data == null || data.workflow_runs.length == 0) {
throw new Error('No successful runs found');
}
const runId = data.workflow_runs[0].id; // Assuming the first one is the latest successful run
return runId;
result-encoding: string
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Report Run ID # useful for debugging
run: echo "Run ID is ${{ steps.get-run-id.outputs.result }}"
test_suite_pr:
needs: get-run-id
strategy:
fail-fast: false
# we do not really need a matrix, as we only do amd64/kvm,
# but this makes it more consistent with the build, and will
# let us expand in the future, if we want
matrix:
arch: [amd64]
hv: [kvm]
if: github.event.review.state == 'approved'
uses: lf-edge/eden/.github/workflows/[email protected]
with:
eve_image: "evebuild/pr:${{ github.event.pull_request.number }}"
eve_artifact_name: eve-${{ matrix.hv }}-${{ matrix.arch }}
artifact_run_id: ${{ needs.get-run-id.outputs.result }}
eden_version: "0.9.6"
test_suite_master:
if: github.ref == 'refs/heads/master'
uses: lf-edge/eden/.github/workflows/[email protected]
with:
eve_image: "lfedge/eve:snapshot"
eden_version: "0.9.6"
test_suite_tag:
if: startsWith(github.ref, 'refs/tags')
uses: lf-edge/eden/.github/workflows/[email protected]
with:
eve_image: "lfedge/eve:${{ github.ref_name }}"
eden_version: "0.9.6"