Skip to content

Commit

Permalink
Add github action testing the latest debian package by running unit t…
Browse files Browse the repository at this point in the history
…ests against it
  • Loading branch information
orzechow committed Nov 12, 2024
1 parent 3103b17 commit 82f2bce
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/run-release-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run release tests

on:
push: # remove that after testing this action
release:
types:
- released

jobs:
build-and-run-release-tests:
runs-on: ubuntu-latest

steps:
- name: Build release test Docker image
uses: docker/build-push-action@v6
with:
push: false
tags: |
ghcr.io/kit-mrt/util_caching_release_tests
target: release_test

- name: Run unit tests with/against released version
run: |
docker run --rm ghcr.io/kit-mrt/util_caching_release_tests
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ RUN cmake .. && \



FROM base AS release_test

# This downloads the latest util_caching debian release and adds it to the docker image
# This "bloats" the image. But otherwise, we'd have to installing wget and ca-certificates
# temporarily to download and install the package in one docker layer…
ADD https://github.com/KIT-MRT/util_caching/releases/latest/download/libutil-caching-dev.deb /tmp/debfiles/

# Install util_caching from release debian package
RUN dpkg -i /tmp/debfiles/*.deb && \
rm -rf /tmp/debfiles

COPY test /tmp/util_caching_test
WORKDIR /tmp/util_caching_test/build

RUN cmake -DBUILD_TESTS=true .. && \
cmake --build . -j9

CMD ["cmake", "--build", ".", "--target", "test"]



FROM base AS install

# Install util_caching
Expand Down

0 comments on commit 82f2bce

Please sign in to comment.