-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gha: add neoeden job to test.yml workflow #1045
Open
uncleDecart
wants to merge
1
commit into
lf-edge:master
Choose a base branch
from
uncleDecart:add-neoeden-to-gha
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+117
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kudos to @shjala for the following comment:
why don't we put all commands calling the tests in this workflow in a bash script and call that script from here
Advantages:
Disadvantages: