From 32cd7f770cb94f2655310d22d242782b8131f31c Mon Sep 17 00:00:00 2001 From: Jakub Rak Date: Tue, 15 Oct 2024 10:25:59 +0200 Subject: [PATCH] Fix issue with running tests as a root --- .github/actions/run-tests/action.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/run-tests/action.yaml b/.github/actions/run-tests/action.yaml index ce4f959..5f20170 100644 --- a/.github/actions/run-tests/action.yaml +++ b/.github/actions/run-tests/action.yaml @@ -27,13 +27,14 @@ runs: - name: Prepare component tests id: prepare-component-tests shell: bash - run: python -m virtualenv venv && source venv/bin/activate && + run: python -m virtualenv roles/oneagent/tests/component/venv && + source roles/oneagent/tests/component/venv/bin/activate && pip install -r roles/oneagent/tests/component/resources/requirements.txt - name: Run component tests id: component-tests shell: bash - run: source venv/bin/activate && cd roles/oneagent/tests/component && - sudo python run.py --linux_x86=localhost + run: cd roles/oneagent/tests/component && + sudo bash -c "source venv/bin/activate python run.py --linux_x86=localhost" - name: Upload logs uses: actions/upload-artifact@v4 if: ${{ always() }}