Skip to content

Commit

Permalink
Merge pull request #161 from crazy-max/desktop-test-postgres
Browse files Browse the repository at this point in the history
test postgis image
  • Loading branch information
crazy-max authored Feb 15, 2024
2 parents 5033c77 + 9415e62 commit ba27ffd
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: "UTC [1] LOG: 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 ba27ffd

Please sign in to comment.