Skip to content

Commit

Permalink
gha: add neoeden job to test.yml workflow
Browse files Browse the repository at this point in the history
Instead of adding additional workflow to eden, we run neoeden alongside
with older version intent is that end user (EVE CI/CD pipeline) will not
require any changes, it will still call test.yml there will be an
additional test suite. End goal is to gradually move all the test suites
to golang-based tests, so at some point smoke tests will be running in
neoeden, or networking tests, etc. etc.

Signed-off-by: Pavel Abramov <[email protected]>
  • Loading branch information
uncleDecart committed Dec 2, 2024
1 parent 68dba0e commit 13852fd
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/actions/run-neoeden-test/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: 'Run Neo-Eden test workflow'
description: 'Setup Eden, run go test and publish logs'

inputs:
file_system:
required: true
type: string
tpm_enabled:
required: true
type: bool
eve_image:
type: string
eve_log_level:
type: string
required: false
default: 'info'
eve_artifact_name:
type: string
artifact_run_id:
type: string
require_virtualization:
type: bool
docker_account: # if not provided: use anonymous docker user
type: string
required: false
default: ''
docker_token:
type: string
required: false
default: ''
aziot_id_scope:
description: 'Azure IoT ID scope'
required: false
aziot_connection_string:
description: 'Azure IoT connection string'
required: false


runs:
using: 'composite'
steps:
- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@v2
with:
proc_trace_sys_enable: true
comment_on_pr: false
- name: Login to Docker Hub
if: inputs.docker_account != ''
uses: docker/login-action@v3
with:
username: ${{ inputs.docker_account }}
password: ${{ inputs.docker_token }}
- name: Setup Environment
uses: ./eden/.github/actions/setup-environment
with:
file_system: ${{ inputs.file_system }}
tpm_enabled: ${{ inputs.tpm_enabled }}
eve_image: ${{ inputs.eve_image }}
eve_log_level: ${{ inputs.eve_log_level }}
eve_artifact_name: ${{ inputs.eve_artifact_name }}
artifact_run_id: ${{ inputs.artifact_run_id }}
require_virtualization: ${{ inputs.require_virtualization }}
- name: Run security tests
run: cd tests/sec && go test
shell: bash
working-directory: "./eden"
env:
AZIOT_ID_SCOPE: ${{ inputs.aziot_id_scope }}
AZIOT_CONNECTION_STRING: ${{ inputs.aziot_connection_string }}
- name: Collect info
if: failure()
uses: ./eden/.github/actions/collect-info
- name: Collect logs
if: always()
uses: ./eden/.github/actions/publish-logs
with:
report_name: eden-report-${{ inputs.suite }}-tpm-${{ inputs.tpm_enabled }}-${{ inputs.file_system }}
- name: Clean up after test
if: always()
run: |
./eden stop
make clean >/dev/null
docker system prune -f -a >/dev/null
shell: bash
working-directory: "./eden"

31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,34 @@ jobs:
require_virtualization: true
docker_account: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
docker_token: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}

neoeden:
continue-on-error: true
strategy:
fail-fast: false
matrix:
file_system: ['ext4', 'zfs']
tpm: [true, false]
name: NeoEden (golang only) tests
needs: determine-runner
runs-on: ${{ fromJSON(needs.determine-runner.outputs.runner) }}
steps:
- name: Get code
uses: actions/[email protected]
with:
repository: "lf-edge/eden"
ref: ${{ inputs.eden_version }}
path: "./eden"
- name: Run Smoke tests
uses: ./eden/.github/actions/run-neoeden-test
with:
file_system: ${{ matrix.file_system }}
tpm_enabled: ${{ matrix.tpm }}
eve_image: ${{ inputs.eve_image }}
eve_log_level: ${{ inputs.eve_log_level }}
eve_artifact_name: ${{ inputs.eve_artifact_name }}
artifact_run_id: ${{ inputs.artifact_run_id }}
docker_account: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
docker_token: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
aziot_id_scope: ${{ secrets.AZIOT_ID_SCOPE }}
aziot_connection_string: ${{ secrets.AZIOT_CONNECTION_STRING }}

0 comments on commit 13852fd

Please sign in to comment.