Skip to content

Commit e185bc2

Browse files
committed
Update handling test wrapper on Github Actions
1 parent b4ec5f8 commit e185bc2

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/test_sftp_modules.yml

+34
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,37 @@ jobs:
6363
TEST_PORT: ${{ secrets.TEST_PORT }}
6464
OUTPUT_LOCATION: ${{ github.workspace }}/tests/
6565

66+
test_wrapper:
67+
runs-on: ubuntu-latest
68+
needs: test_download
69+
if: github.repository_owner == 'BU-ISCIII'
70+
strategy:
71+
max-parallel: 1
72+
matrix:
73+
download_options: ["download_only", "download_clean"]
74+
75+
steps:
76+
- name: Set up Python 3.9.16
77+
uses: actions/setup-python@v3
78+
with:
79+
python-version: '3.9.16'
80+
81+
- name: Checkout code
82+
uses: actions/checkout@v3
83+
with:
84+
ref: ${{ github.event.pull_request.head.sha }}
85+
fetch-depth: 0
86+
87+
- name: Install package and dependencies
88+
run: |
89+
pip install -r requirements.txt
90+
pip install .
91+
92+
- name: Run Wrapper tests
93+
run: |
94+
python3 tests/test_wrapper_handle.py --download_option ${{ matrix.download_options }}
95+
env:
96+
TEST_USER: ${{ secrets.TEST_USER }}
97+
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
98+
TEST_PORT: ${{ secrets.TEST_PORT }}
99+
OUTPUT_LOCATION: ${{ github.workspace }}/tests/

tests/test_wrapper_handle.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ def prepare_remote_test(**kwargs):
126126
"target_folders": kwargs["target_folders"],
127127
}
128128

129-
download_manager.relecov_sftp.sftp_port = os.environ["TEST_PORT"]
130-
129+
wrapper_manager.download_manager.relecov_sftp.sftp_port = os.environ["TEST_PORT"]
131130
def test_wrapper(wrapper_manager):
132131
wrapper_manager.run_wrapper()
133132

0 commit comments

Comments
 (0)