chore(deps): update sonarsource/sonarqube-scan-action action to v8 #365
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
| name: E2E test CI | |
| permissions: | |
| contents: read | |
| packages: read | |
| actions: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v* | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - ".github/workflows/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| pull_request: | |
| branches: | |
| - main | |
| # allow the test CI to be manually triggerred | |
| workflow_dispatch: | |
| jobs: | |
| ota_image_e2e_test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| SYS_IMG_ROOTFS: sys_img_for_test | |
| OTA_IMAGE_OUTPUT: ota_image | |
| OTA_IMAGE_ARTIFACT: ota_image.zip | |
| DEPLOYED_ROOTFS: deployed_rootfs | |
| DEPLOYED_ROOTFS_PRD: deployed_rootfs_prd | |
| CERT_DIR: certs | |
| steps: | |
| - name: Checkout commit | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| # NOTE: this should be enough to let hatch-vcs determines the | |
| # version from git tags. | |
| fetch-depth: 200 | |
| fetch-tags: true | |
| - name: Setup python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.11.8" | |
| - name: Build and setup ota-image-builder binary | |
| run: | | |
| uv run --locked pyinstaller -s -F --optimize=2 \ | |
| --name ota-image-builder \ | |
| src/ota_image_builder/__main__.py | |
| ./dist/ota-image-builder version | |
| ln -s ota-image-builder ./dist/ota-image-tools | |
| - name: Setup test PKI | |
| run: ./tests/scripts/gen_cert_chain.sh ${CERT_DIR} | |
| - name: Prepare test system image rootfs | |
| run: sudo ./tests/e2e/scripts/e2e_build_sys_img.sh ${SYS_IMG_ROOTFS} | |
| - name: Build OTA image from the input test system image | |
| run: | | |
| DATA=./tests/data sudo -E ./tests/e2e/scripts/e2e_build_ota_image.sh \ | |
| ./dist/ota-image-builder \ | |
| ${SYS_IMG_ROOTFS} \ | |
| ${OTA_IMAGE_OUTPUT} ${OTA_IMAGE_ARTIFACT} | |
| - name: Verify sign cert and signature of the built image | |
| run: | | |
| rm -rf ${CERT_DIR}/*.key | |
| ./dist/ota-image-tools verify-sign --ca-dir ${CERT_DIR} ${OTA_IMAGE_OUTPUT} | |
| - name: Deploy OTA image payload(dev payload) and test it | |
| run: | | |
| sudo ./dist/ota-image-tools deploy-image \ | |
| --image ${OTA_IMAGE_ARTIFACT} \ | |
| --rootfs-dir ${DEPLOYED_ROOTFS} \ | |
| --ecu-id autoware --release-key dev | |
| sudo rm -rf ${DEPLOYED_ROOTFS}/.ota-resources | |
| sudo ./tests/e2e/scripts/compare_rootfs.py ${SYS_IMG_ROOTFS} ${DEPLOYED_ROOTFS} | |
| sudo ./tests/e2e/scripts/confirm_docker_whiteout_files.sh ${DEPLOYED_ROOTFS} | |
| - name: Deploy OTA image payload(prd payload) and Compare with origin | |
| run: | | |
| sudo ./dist/ota-image-tools deploy-image \ | |
| --image ${OTA_IMAGE_ARTIFACT} \ | |
| --rootfs-dir ${DEPLOYED_ROOTFS_PRD} \ | |
| --ecu-id autoware --release-key prd | |
| sudo rm -rf ${DEPLOYED_ROOTFS_PRD}/.ota-resources | |
| sudo ./tests/e2e/scripts/compare_rootfs.py ${SYS_IMG_ROOTFS}/var ${DEPLOYED_ROOTFS_PRD} |