-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gha: add neoeden job to test.yml workflow
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
1 parent
68dba0e
commit 13852fd
Showing
2 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |