Skip to content

Commit

Permalink
Second try
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko committed Jul 23, 2024
1 parent cc5e7c7 commit 768d245
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Docker tests'
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Docker tests
shell: bash
run: ./build.sh docker-test
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@ do
;;

docker-test)
set -ex
export DOCKER_DEFAULT_PLATFORM="$(docker info --format "{{.OSType}}/{{.Architecture}}")"
tar -cf- share/docker/Dockerfile $DOCKER_EXTRA_CONTEXT |
DOCKER_BUILDKIT=1 docker build -t avro-test -f share/docker/Dockerfile -
DOCKER_BUILDKIT=1 docker build -t avro-test --build-arg BUILDPLATFORM="${DOCKER_DEFAULT_PLATFORM}" -f share/docker/Dockerfile -
docker run --rm -v "${PWD}:/avro${DOCKER_MOUNT_FLAG}" --env "JAVA=${JAVA:-8}" avro-test /avro/share/docker/run-tests.sh
;;

Expand Down

0 comments on commit 768d245

Please sign in to comment.