[Tests] All Tests #1
This file contains hidden or 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
| --- | |
| # SPDX-FileCopyrightText: (C) 2025 Intel Corporation | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: "[Tests] All Tests" | |
| run-name: "[Tests] All Tests" | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" # Runs daily at 2:00 AM UTC | |
| workflow_dispatch: | |
| inputs: | |
| cleanup: | |
| description: "Cleanup before running ALL tests" | |
| required: false | |
| default: false | |
| type: boolean | |
| timeout: | |
| description: "Timeout for the job in minutes" | |
| required: false | |
| type: number | |
| default: 70 | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| # Trigger workflow when enqueued to a merge group | |
| # (must be under 'on') | |
| merge_group: {} | |
| # Only run at most 1 workflow concurrently per PR or per branch to keep costs down | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| SUPASS: ${{ secrets.SUPASS }} | |
| BUILD_TYPE: DAILY | |
| permissions: | |
| contents: read | |
| jobs: | |
| run-all-tests: | |
| name: "Run All Tests" | |
| runs-on: [self-hosted] | |
| timeout-minutes: ${{ fromJSON(inputs.timeout || '70') }} | |
| steps: | |
| - name: "Remove all Docker images" | |
| if: ${{ github.event.inputs.cleanup == 'true' }} | |
| run: | | |
| docker system prune -a --volumes -f | |
| - name: Checkout Repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Setup Python" | |
| id: setup-python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.13" | |
| - name: "Cache Python Virtualenv" | |
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | |
| with: | |
| path: venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.github/resources/requirements.txt') }} | |
| restore-keys: | | |
| venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }} | |
| - name: "Run Secrets and Certificates Initialization" | |
| run: | | |
| git clean -fdx | |
| make clean-all | |
| make -C tools/certificates clean | |
| make init-secrets | |
| - name: "Build scene_common" | |
| run: | | |
| make -C scene_common | |
| - name: "Run All Tests" | |
| run: | | |
| python3 -m venv venv | |
| source $PWD/venv/bin/activate | |
| echo "$PWD/venv/bin" >> $GITHUB_PATH | |
| pip install -r .github/resources/requirements.txt | |
| make run_tests | |
| - name: Rename logs to remove colons | |
| if: always() | |
| run: | | |
| set +e # Ignore errors if no logs are found | |
| find . -wholename "**/test_data/**/*.log" -exec rename 's/:/-/g' {} + | |
| exit 0 | |
| - name: Upload Test Reports | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2 | |
| with: | |
| name: tests-reports | |
| path: | | |
| tests/**/test_reports/**/*.html | |
| tests/**/test_reports/**/*.xml | |
| - name: Upload Test Logs | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2 | |
| with: | |
| name: tests-logs | |
| path: | | |
| **/test_data/**/*.log | |
| - name: "Stop all running Docker containers" | |
| if: always() | |
| run: | | |
| docker ps -aq | xargs docker rm -f || true | |
| - name: "Remove all volumes used in test" | |
| if: always() | |
| run: | | |
| docker volume ls -q | xargs docker volume rm -f || true | |
| - name: "Clean runner" | |
| if: always() | |
| run: | | |
| sudo rm -rf * || true |