Skip to content

Commit

Permalink
ci(pytest): remove redundant var build_test_img
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 22, 2023
1 parent 3ec3c0d commit 814b5e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pr_test_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
uses: ./.github/workflows/r-pytest.yml
with:
docker_compose_service: api
build_test_img: true
# cache_imgs: |
# "docker.io/postgis/postgis:${{ vars.POSTGIS_TAG }}"
# "docker.io/minio/minio:${{ vars.MINIO_TAG }}"
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/r-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ on:
description: "Optional image tag override."
required: false
type: string
default: ci-development
build_test_img:
description: "Build an image prior to test, e.g. if new deps added."
required: false
type: boolean
default: false
cache_imgs:
description: "Space separated list of images to cache on each run."
required: false
Expand Down Expand Up @@ -50,7 +44,7 @@ jobs:
backend-test-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@main
needs: [check-img-cache]
if: ${{ inputs.build_test_img && needs.check-img-cache.outputs.cache-hit != 'true' }}
if: ${{ inputs.image_tag == "" && needs.check-img-cache.outputs.cache-hit != 'true' }}
with:
context: src/backend
build_target: ci
Expand All @@ -66,7 +60,7 @@ jobs:
run-pytest:
runs-on: ubuntu-latest
needs: [backend-test-build]
# Ensure it runs, even if build_test_img=false
# Ensure it runs, even if backend-test-build does not run
if: always()
environment:
name: ${{ inputs.environment }}
Expand Down Expand Up @@ -110,8 +104,8 @@ jobs:
pull_and_package_image "$image"
done
# Cache backend build
image_tag=${{ needs.backend-test-build.outputs.image_tag || inputs.image_tag }}
# Cache backend build (fallback to ci-development tag)
image_tag=${{ needs.backend-test-build.outputs.image_tag || ci-development }}
image="ghcr.io/${{ github.repository }}/backend:${image_tag}"
pull_and_package_image "$image"
echo "API_TAG_OVERRIDE=${image_tag}" >> $GITHUB_ENV
Expand Down

0 comments on commit 814b5e0

Please sign in to comment.