Makefile: Use podman as a user for testing and docs

This commit is contained in:
Brian C. Lane 2021-04-23 12:08:15 -07:00
parent b75b692607
commit 99ba2fe12c
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ jobs:
- name: "Clone Repository" - name: "Clone Repository"
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Run lorax tests in podman - name: Run lorax tests in podman
run: make test-in-docker && cp .test-results/.coverage .coverage run: sudo make test-in-podman && cp .test-results/.coverage .coverage
- name: Coveralls - name: Coveralls
uses: AndreMiras/coveralls-python-action@develop uses: AndreMiras/coveralls-python-action@develop
with: with:

View File

@ -112,9 +112,9 @@ test-in-copy:
test-in-docker: test-in-podman test-in-docker: test-in-podman
test-in-podman: test-in-podman:
sudo $(DOCKER) build -t welder/lorax-tests:$(IMAGE_RELEASE) -f Dockerfile.test . $(DOCKER) build -t welder/lorax-tests:$(IMAGE_RELEASE) -f Dockerfile.test .
@mkdir -p `pwd`/.test-results @mkdir -p `pwd`/.test-results
sudo $(DOCKER) run --rm -it -v `pwd`/.test-results/:/test-results \ $(DOCKER) run --rm -it -v `pwd`/.test-results/:/test-results \
-v `pwd`:/lorax-ro:ro --security-opt label=disable \ -v `pwd`:/lorax-ro:ro --security-opt label=disable \
--env RUN_TESTS="$(RUN_TESTS)" \ --env RUN_TESTS="$(RUN_TESTS)" \
welder/lorax-tests:$(IMAGE_RELEASE) make test-in-copy welder/lorax-tests:$(IMAGE_RELEASE) make test-in-copy
@ -123,7 +123,7 @@ test-in-podman:
docs-in-docker: docs-in-podman docs-in-docker: docs-in-podman
docs-in-podman: docs-in-podman:
sudo $(DOCKER) run -it --rm -v `pwd`:/lorax-ro:ro \ $(DOCKER) run -it --rm -v `pwd`:/lorax-ro:ro \
-v `pwd`/docs/:/lorax-ro/docs/ \ -v `pwd`/docs/:/lorax-ro/docs/ \
--env LORAX_VERSION=$(DOCS_VERSION) \ --env LORAX_VERSION=$(DOCS_VERSION) \
--env LOCAL_UID=`id -u` --env LOCAL_GID=`id -g` \ --env LOCAL_UID=`id -u` --env LOCAL_GID=`id -g` \