Skip to content

Commit

Permalink
Set eve_tag and eve_registry for eden tests for PR's build (#881)
Browse files Browse the repository at this point in the history
Reusable workflow will use `eve_image` parameter, which includes both registry and tag for EVE.
If `eve_image` will be provided respective eden setting `eve.tag` and `eve.registry` will be set.

Signed-off-by: yash-zededa <yash@zededa.com>
  • Loading branch information
yash-zededa authored Jul 28, 2023
1 parent d40f437 commit dee1c36
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/actions/run-eden-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
suite:
required: true
type: string
eve_tag:
eve_image:
type: string

runs:
Expand All @@ -22,7 +22,7 @@ runs:
with:
file_system: ${{ inputs.file_system }}
tpm_enabled: ${{ inputs.tpm_enabled }}
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}
- name: Run tests
run: EDEN_TEST_STOP=n ./eden test ./tests/workflow -s ${{ inputs.suite }} -v debug
shell: bash
Expand Down
10 changes: 7 additions & 3 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
tpm_enabled:
required: true
type: bool
eve_tag:
eve_image:
type: string

runs:
Expand Down Expand Up @@ -50,9 +50,13 @@ runs:
shell: bash
working-directory: "./eden"
- name: Setup eve version
if: "${{ inputs.eve_tag != '' }}"
if: ${{ inputs.eve_image != '' }} and contains(${{ inputs.eve_image }}, ":" )
run: |
./eden config set default --key eve.tag --value=${{ inputs.eve_tag }}
image=${{ inputs.eve_image }}
eve_pr_registry=$(echo "$image" | cut -d ':' -f 1)
eve_pr=$(echo "$image" | cut -d ':' -f 2 | cut -d "-" -f1)
./eden config set default --key=eve.registry --value="$eve_pr_registry"
./eden config set default --key=eve.tag --value="$eve_pr"
shell: bash
working-directory: "./eden"
- name: Setup ext4
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ name: Test
on:
workflow_dispatch:
inputs:
eve_tag:
eve_image:
type: string
workflow_call:
inputs:
eve_tag:
eve_image:
type: string

jobs:
Expand All @@ -32,7 +32,7 @@ jobs:
file_system: ${{ matrix.file_system }}
tpm_enabled: ${{ matrix.tpm }}
suite: "smoke.tests.txt"
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}

networking:
name: Networking test suite
Expand All @@ -42,15 +42,15 @@ jobs:
- name: Get code
uses: actions/checkout@v3
with:
repository: ${{ github.event.repository.full_name }}
repository: "lf-edge/eden"
path: "./eden"
- name: Run Networking tests
uses: ./eden/.github/actions/run-eden-test
with:
file_system: "ext4"
tpm_enabled: true
suite: "networking.tests.txt"
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}

storage:
continue-on-error: true
Expand All @@ -64,15 +64,15 @@ jobs:
- name: Get code
uses: actions/checkout@v3
with:
repository: ${{ github.event.repository.full_name }}
repository: "lf-edge/eden"
path: "./eden"
- name: Run Storage tests
uses: ./eden/.github/actions/run-eden-test
with:
file_system: ${{ matrix.file_system }}
tpm_enabled: true
suite: "storage.tests.txt"
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}

lpc-loc:
name: LPC LOC test suite
Expand All @@ -82,15 +82,15 @@ jobs:
- name: Get code
uses: actions/checkout@v3
with:
repository: ${{ github.event.repository.full_name }}
repository: "lf-edge/eden"
path: "./eden"
- name: Run LPC LOC tests
uses: ./eden/.github/actions/run-eden-test
with:
file_system: "ext4"
tpm_enabled: true
suite: "lpc-loc.tests.txt"
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}

eve-upgrade:
continue-on-error: true
Expand All @@ -104,15 +104,15 @@ jobs:
- name: Get code
uses: actions/checkout@v3
with:
repository: ${{ github.event.repository.full_name }}
repository: "lf-edge/eden"
path: "./eden"
- name: Run EVE upgrade tests
uses: ./eden/.github/actions/run-eden-test
with:
file_system: ${{ matrix.file_system }}
tpm_enabled: true
suite: "eve-upgrade.tests.txt"
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}

user-apps:
name: User apps test suite
Expand All @@ -122,13 +122,13 @@ jobs:
- name: Get code
uses: actions/checkout@v3
with:
repository: ${{ github.event.repository.full_name }}
repository: "lf-edge/eden"
path: "./eden"
- name: Run User apps upgrade tests
uses: ./eden/.github/actions/run-eden-test
with:
file_system: "ext4"
tpm_enabled: true
suite: "user-apps.tests.txt"
eve_tag: ${{ inputs.eve_tag }}
eve_image: ${{ inputs.eve_image }}

0 comments on commit dee1c36

Please sign in to comment.