diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 1808abb7892..2590e42cc46 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -488,89 +488,3 @@ jobs: # Run create_from_images_zip_test e2e tests cd e2etests bazel test orchestration/create_from_images_zip_test:create_from_images_zip_test_test - e2etests-podcvd-generate-matrix: - runs-on: ubuntu-24.04 - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - name: Generate Test List via Bazel Query - id: set-matrix - run: | - cd e2etests - PODCVD_TESTS=$(bazel query 'attr(tags, "podcvd", //cvd/...)' 2>/dev/null | sort) - PODCVD_TEST_GROUPS=$(echo "$PODCVD_TESTS" | xargs -n 3 | jq -R -n -c '[inputs] | {test_group: .}') - echo "Groupped test cases of podcvd per runner: $PODCVD_TEST_GROUPS" - echo "matrix=${PODCVD_TEST_GROUPS}" >> $GITHUB_OUTPUT - e2etests-podcvd: - name: e2etests-podcvd-${{ strategy.job-index }} - runs-on: ubuntu-24.04 - needs: [e2etests-podcvd-generate-matrix, build-debian-package-amd64, build-docker-image-amd64] - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.e2etests-podcvd-generate-matrix.outputs.matrix) }} - steps: - - name: Free disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # aka v1.3.1 - with: - docker-images: false - swap-storage: false - tool-cache: true - - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - name: Download cuttlefish debs - uses: actions/download-artifact@v7 - with: - name: debs_amd64 - - name: Install cuttlefish-podcvd - run: | - tar -xvf debs_amd64.tar - sudo apt install -y ./cuttlefish-podcvd_*.deb - /usr/lib/cuttlefish-podcvd/bin/podcvd-setup - - name: Download docker image - uses: actions/download-artifact@v7 - with: - name: cuttlefish-orchestration-amd64 - - name: Upgrade crun - uses: ./.github/actions/upgrade-crun - - name: Load docker image as podman image - run: | - sudo sysctl -w kernel.unprivileged_userns_clone=1 - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - sudo apt install -y skopeo - - # On E2E test, it uses podman local image unlike production. - # Setting graphroot for this case is necessary to find local image by podman CLI. - DRIVER=$(podman info --format '{{ .Store.GraphDriverName }}') - GRAPHROOT=$(podman info --format '{{ .Store.GraphRoot }}') - mkdir -p /tmp/podcvd-podman-config - cat < /tmp/podcvd-podman-config/storage.conf - [storage] - driver = "$DRIVER" - graphroot = "$GRAPHROOT" - rootless_storage_path = "$GRAPHROOT" - EOF - - CONTAINERS_STORAGE_CONF=/tmp/podcvd-podman-config/storage.conf skopeo copy \ - docker-archive:cuttlefish-orchestration.tar \ - containers-storage:localhost/cuttlefish-orchestration:latest - - name: Run cvd e2e test for podcvd - run: | - # TODO(b/520405665): Resolve flakiness when not doing chmod. - sudo chmod 666 /dev/kvm - - cd e2etests - bazel test \ - ${{ matrix.test_group }} \ - --test_env=HOME=$HOME \ - --test_env=USE_PODCVD=true \ - --test_env=XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \ - --test_env=CONTAINERS_STORAGE_CONF=/tmp/podcvd-podman-config/storage.conf \ - --test_output=errors - - name: Upload test logs - if: always() - uses: actions/upload-artifact@v6 - with: - name: e2etests-podcvd-logs-${{ strategy.job-index }} - path: e2etests/bazel-testlogs