-
Notifications
You must be signed in to change notification settings - Fork 164
81 lines (75 loc) · 2.52 KB
/
eden.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
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/test.yml@0.9.6
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/test.yml@0.9.6
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/test.yml@0.9.6
with:
eve_image: "lfedge/eve:${{ github.ref_name }}"
eden_version: "0.9.6"