diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00f5f5f..3a8607b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,22 @@ jobs: runs-on: ubuntu-latest container: zilder/pg-ext-check steps: + # Install and run postgres - run: pg-setup ${{ matrix.pg }} - - run: apt-get install -yq librdkafka-dev libz-dev + + # Install packages + - run: mkdir -p /usr/share/man/man1 + - run: apt-get install -yq librdkafka-dev libz-dev default-jre-headless wget + + # Clone repo - uses: actions/checkout@v2 + + # Install and run zookeeper/kafka + - run: mkdir /kafka - run: ./run_kafka.sh working-directory: ./test + + # Build kafka_fdw and run tests - run: build-check env: KAFKA_PRODUCER: "/kafka/bin/kafka-console-producer.sh" diff --git a/.github/workflows/ci_local_docker.yml b/.github/workflows/ci_dockerfile.yml similarity index 87% rename from .github/workflows/ci_local_docker.yml rename to .github/workflows/ci_dockerfile.yml index c8c63c3..c0c1486 100644 --- a/.github/workflows/ci_local_docker.yml +++ b/.github/workflows/ci_dockerfile.yml @@ -1,4 +1,4 @@ -name: CI (from Dockerfile) +name: build on: push: @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - pg: [14, 13, 12] + pg: [14, 13, 12, 11, 10, 9.6] name: PostgreSQL ${{ matrix.pg }} runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index 8e26dde..19e906a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk --no-cache add make musl-dev gcc clang llvm util-linux-dev wget librdkaf # Make postgres directories writable RUN chmod a+rwx /usr/local/lib/postgresql && \ - chmod a+rwx /usr/local/lib/postgresql/bitcode && \ + chmod a+rwx /usr/local/lib/postgresql/bitcode || true && \ chmod a+rwx /usr/local/share/postgresql/extension # Make directories diff --git a/README.md b/README.md index a6f2dc0..9f69cb4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kafka Foreign Data Wrapper for PostgreSQL -[![Build Status](https://travis-ci.org/adjust/kafka_fdw.svg?branch=master)](https://travis-ci.org/adjust/kafka_fdw) +[![build](https://github.com/adjust/kafka_fdw/actions/workflows/ci_dockerfile.yml/badge.svg)](https://github.com/adjust/kafka_fdw/actions/workflows/ci_dockerfile.yml) At this point the project is not yet production ready. Use with care. Pull requests welcome diff --git a/test/run_kafka.sh b/test/run_kafka.sh index 4271ccb..c020d6a 100755 --- a/test/run_kafka.sh +++ b/test/run_kafka.sh @@ -12,14 +12,6 @@ DIST=$(cat /etc/os-release | grep ^ID= | sed s/ID=//) echo -if [ $DIST != 'alpine' ]; then - # Install JRE - mkdir -p /usr/share/man/man1 - apt-get update - export DEBIAN_FRONTEND=noninteractive - apt-get install -yq default-jre-headless wget -fi - # Download Apache Kafka wget https://downloads.apache.org/kafka/${KAFKA_VERSION}/${KAFKA_ARCHIVE} tar -xzf ${KAFKA_ARCHIVE} -C /kafka --strip-components=1