diff --git a/.github/actions/run-neoeden-test/actions.yml b/.github/actions/run-neoeden-test/actions.yml new file mode 100644 index 000000000..bf5185a07 --- /dev/null +++ b/.github/actions/run-neoeden-test/actions.yml @@ -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" + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec72b6744..1c93859df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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/checkout@v4.1.1 + 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 }}