diff mbox series

[7/7] github workflows: foreign.yaml: fix config dir in run environment

Message ID 20220503220646.16925-8-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: fix unit test breakage | expand

Commit Message

Martin Wilck May 3, 2022, 10:06 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

The foreign workflow uses a container for running the tests. The
paths for the working directory must match between builder and
runner, otherwise the hwtable test fails while trying to create
the CONFIG_DIR.

The container uses ${{ github.workspace }} as working directory,
whereas the build environment uses the abbreviated
__w/multipath-tools/multipath-tools. Adapt the build environment such
that the path is correct later.

See https://github.com/mosteo-actions/docker-run/blob/v1/action.yml

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 .github/workflows/foreign.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.github/workflows/foreign.yaml b/.github/workflows/foreign.yaml
index c164cb3..e9ffd3d 100644
--- a/.github/workflows/foreign.yaml
+++ b/.github/workflows/foreign.yaml
@@ -24,7 +24,8 @@  jobs:
         run: make test
       - name: build
         if: ${{ matrix.arch != '' && matrix.arch != '-i386' }}
-        run: make test-progs
+        # The build path is different between builder and runner
+        run: make TESTDIR=${{ github.workspace }}/tests test-progs
       - name: archive
         if: ${{ matrix.arch != '' && matrix.arch != '-i386' }}
         run: >
@@ -61,6 +62,8 @@  jobs:
         uses: mosteo-actions/docker-run@v1
         with:
           image: mwilck/multipath-run-${{ matrix.os }}-${{ matrix.arch }}
-          # The runner is an image that has "make" as entrypoint
+          # The runner is an image that has "make" as entrypoint and uses
+          # github.workspace as both host dir and guest volume by default.
+          # See https://github.com/mosteo-actions/docker-run/blob/v1/action.yml
           # So run "make -C tests" here
           command: -C tests