diff --git a/.github/workflows/regression_tests.yaml b/.github/workflows/regression_tests.yaml index 28b95453d..11985f129 100644 --- a/.github/workflows/regression_tests.yaml +++ b/.github/workflows/regression_tests.yaml @@ -69,13 +69,18 @@ jobs: ### Step 2: Retrieve all other necessary images from Docker Hub and store as artifacts ### (to avoid possible Docker Hub pull limits) - hub-pulled-docker: + cache-docker-images: runs-on: ubuntu-22.04 steps: - name: Checkout pmacct uses: actions/checkout@v4 with: path: pmacct + fetch-depth: 0 + fetch-tags: 1 + + - name: Build containers + uses: ./pmacct/.github/actions/build_containers/ - name: Download images and prepare artifacts run: | @@ -90,7 +95,8 @@ jobs: echo echo "Saving images as artifacts..." mkdir -p /tmp/docker/ - docker save -o /tmp/docker/hub_pulled_docker_images.tar $ZOOKEEPER_IMG $KAFKA_IMG $SCHEMAREGISTRY_IMG $REDIS_IMG + PMACCT_IMAGES=$(docker image ls | grep "_build") + docker save -o /tmp/docker/hub_pulled_docker_images.tar $ZOOKEEPER_IMG $KAFKA_IMG $SCHEMAREGISTRY_IMG $REDIS_IMG $PMACCT_IMAGES - name: Upload Artifacts uses: actions/upload-artifact@v4 @@ -121,7 +127,7 @@ jobs: ### Step 4: Setup Framework and Run Tests pytest-runtests: - needs: [collect-tests, traf-repro-docker, hub-pulled-docker] + needs: [collect-tests, traf-repro-docker, cache-docker-images] runs-on: ubuntu-22.04 env: SKIP: 'false' @@ -137,9 +143,6 @@ jobs: fetch-depth: 0 fetch-tags: 1 - - name: Build containers - uses: ./pmacct/.github/actions/build_containers/ - - name: Set up Python 3.10 uses: actions/setup-python@v5 with: