diff --git a/.dockerignore b/.dockerignore index 6244185b0..2e8e40bc6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,6 +4,7 @@ # Include source directories and files required for building. !karapace +!go !requirements/*.txt !setup.py !version.py diff --git a/.github/workflows/schema.yml b/.github/workflows/schema.yml index 1ee9a8049..6665ab235 100644 --- a/.github/workflows/schema.yml +++ b/.github/workflows/schema.yml @@ -21,7 +21,7 @@ jobs: requirements.txt - name: Install libsnappy-dev run: sudo apt install libsnappy-dev - - run: pip install -r requirements/requirements.txt + - run: make install # Compare with latest release when running on main. - run: make schema against=$(git describe --abbrev=0 --tags) if: github.ref == 'refs/heads/main' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fd9a63c2b..33bdec5df 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,11 @@ jobs: cache: pip python-version: ${{ matrix.python-version }} + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.21.0' + - run: make install version - run: make unit-tests env: diff --git a/container/Dockerfile b/container/Dockerfile index 61ad142b8..9e252d610 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -8,6 +8,13 @@ RUN python3 -m venv /venv ENV PATH="/venv/bin:$PATH" ENV PIP_REQUIRE_VIRTUALENV=true +# Install golang needed by extensions +ENV GO_VERSION=1.21.0 +ENV PATH="/usr/local/go/bin:${PATH}" +RUN wget --progress=dot:giga "https://go.dev/dl/go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \ + && tar -C /usr/local -xzf "go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \ + && rm "go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" + # Copy the requirements.txt and install dependencies in venv. Using a separate # command to use layer caching. #