Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the git actions to get the files from gdrive [all tests ci] #131

Closed
wants to merge 10 commits into from
6 changes: 6 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

env:
NUM_WORKERS: 2
TEST_DATA_FOLDER: ${{ github.workspace }}/test_data

jobs:
test:
Expand Down Expand Up @@ -62,6 +63,11 @@ jobs:

# Check data endpoint
curl http://localhost:8080/data/
# Add the following steps for downloading and unzipping test data
- name: Download Test Data from Google Drive
run: |
wget --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8" -O test_data.zip && rm -rf /tmp/cookies.txt
unzip -n test_data.zip -d ${{ env.TEST_DATA_FOLDER }}
- name: Finding changed files
id: files
uses: Ana06/get-changed-files@v2.2.0
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/windows-utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

env:
CONDA_ENV: echopype
TEST_DATA_FOLDER: ${{ github.workspace }}\\test_data

jobs:
windows-test:
Expand Down Expand Up @@ -64,6 +65,32 @@ jobs:
- name: Install echopype
run: |
python -m pip install -e .
# Add steps for downloading and unzipping test data
- name: Create Test Data Directory
run: New-Item -ItemType Directory -Force -Path ${{ env.TEST_DATA_FOLDER }}
- name: Install wget
run: choco install wget
shell: powershell
#- name: Download Test Data from Google Drive
# run: |
# $downloadLink = "https://drive.google.com/uc?export=download&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8"
# $downloadPage = Invoke-WebRequest -Uri $downloadLink -OutFile "download.html"
# $confirmCode = (Select-String -Path "download.html" -Pattern 'confirm=([0-9A-Za-z_]+)' -AllMatches).Matches.Groups[1].Value
# $downloadFileLink = "https://drive.google.com/uc?export=download&confirm=$confirmCode&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8"
# Invoke-WebRequest -Uri $downloadFileLink -OutFile "test_data.zip"
- name: Download Test Data from Google Drive
run: |
Remove-Item alias:wget
wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8' -O- | Out-String | Select-String -Pattern 'confirm=([0-9A-Za-z_]+)' | %{ $_.Matches.Groups[1].Value } > confirm.txt
$confirmCode = Get-Content confirm.txt
wget --load-cookies cookies.txt "https://drive.google.com/uc?export=download&confirm=$confirmCode&id=1ofiSQ4zDwXfHE65tow4_jDIceBYHNW_8" -O test_data.zip
Remove-Item cookies.txt -Force
Remove-Item confirm.txt -Force
shell: powershell

- name: Unzip Test Data
run: Expand-Archive -LiteralPath "test_data.zip" -DestinationPath ${{ env.TEST_DATA_FOLDER }} -Force

- name: Running all Tests
run: |
pytest -vvv -rx --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings echopype/tests/utils |& tee ci_${{ matrix.python-version }}_test_log.log
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ xarray-datatree==0.0.6
psutil>=5.9.1
geopy
flox>=0.7.2,<1.0.0
charset-normalizer<3.2
dask-image
Loading