Preserve env variables for sudo calls

This commit is contained in:
Orsiris de Jong 2023-06-10 19:20:43 +02:00
parent 91950446f0
commit b15e8e8f88
3 changed files with 7 additions and 8 deletions

View File

@ -15,12 +15,11 @@ jobs:
run: |
sudo apt-get install inotify-tools acl
- name: Execute tests and generate coverage report
env: |
RUNNING_ON_GITHUB_ACTIONS=true
SSH_PORT=22
run: |
export RUNNING_ON_GITHUB_ACTIONS=true
export SSH_PORT=22
echo "Running on github actions: ${RUNNING_ON_GITHUB_ACTIONS}"
echo "Running on ssh port ${SSH_PORT}"
sudo bash ./dev/tests/run_tests.sh
sudo -E bash ./dev/tests/run_tests.sh
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1

View File

@ -23,6 +23,6 @@ jobs:
run: |
export RUNNING_ON_GITHUB_ACTIONS=true
export SSH_PORT=22
sudo bash ./dev/tests/run_tests.sh
sudo -E bash ./dev/tests/run_tests.sh
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1

View File

@ -20,9 +20,9 @@ jobs:
- name: Execute tests and generate coverage report
shell: wsl-bash {0}
run: |
export RUNNING_ON_GITHUB_ACTIONS=true
export SSH_PORT=22
find . -type f -not -path ".git/*" -print0 | xargs -0 -n 1 -P 4 dos2unix
export RUNNING_ON_GITHUB_ACTIONS=true
export SSH_PORT=22
find ./ -type f ! -path "./.git/*" -print0 | xargs -0 -n 1 -P 4 dos2unix
service ssh start
./dev/tests/run_tests.sh
- name: Upload Coverage to Codecov