Skip to content

Commit

Permalink
test postgis image
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Feb 15, 2024
1 parent 5033c77 commit 4525955
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ jobs:
- target: desktop
dockerfile: tini
platform: linux/arm64
run: true
run_args: --rm
- target: desktop
dockerfile: postgis
platform: linux/arm64
run_args: -d --name postgis
logs_ctn_name: postgis
logs_check: database system is ready to accept connections
steps:
-
name: Checkout
Expand Down Expand Up @@ -183,16 +189,24 @@ jobs:
docker buildx build --platform ${{ matrix.platform }} --output type=cacheonly .
-
name: Load image
if: ${{ matrix.run }}
if: ${{ matrix.run_args != '' }}
working-directory: test/dockerfiles/${{ matrix.dockerfile }}
run: |
docker buildx build --platform ${{ matrix.platform }} -t ${{ matrix.dockerfile }}:local --load .
-
name: Run
if: ${{ matrix.run }}
if: ${{ matrix.run_args != '' }}
working-directory: test/dockerfiles/${{ matrix.dockerfile }}
run: |
docker run --rm --platform ${{ matrix.platform }} ${{ matrix.dockerfile }}:local
docker run ${{ matrix.run_args }} --platform ${{ matrix.platform }} ${{ matrix.dockerfile }}:local
-
name: Check container logs
if: ${{ matrix.logs_ctn_name != '' && matrix.logs_check != '' }}
uses: crazy-max/.github/.github/actions/container-logs-check@main
with:
container_name: ${{ matrix.logs_ctn_name }}
log_check: ${{ matrix.logs_check }}
timeout: 120

build:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions test/dockerfiles/postgis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM postgis/postgis:15-master
ENV POSTGRES_PASSWORD=password

0 comments on commit 4525955

Please sign in to comment.