-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Run tests with h5py in workflow #193
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ace7ad2
Make empty selection shape agree with numpy
mattjala d81c91a
Fix expected fail tests not failing with h5py
mattjala 24de987
Add h5py test workflow
mattjala dbd5246
Change expected exception type
mattjala b4cb75f
Work around h5py is_hdf5
mattjala 74dfe10
Test h5pyd on windows
mattjala 6edba79
Use default shell with hstouch
mattjala f86c0d3
Show HSDS logs on h5pyd test failure
mattjala 0adf64c
Use bash to start HSDS, default shell to run tests
mattjala 04f715c
Make getPathFromDomain OS-agnostic
mattjala 407ffb1
Properly skip folder tests with h5py
mattjala 0641bba
Fix test2_username
mattjala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,18 +14,18 @@ env: | |
USER2_PASSWORD: test | ||
HSDS_USERNAME: test_user1 | ||
HSDS_PASSWORD: test | ||
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock | ||
HSDS_ENDPOINT: http://127.0.0.1:5101 | ||
ROOT_DIR: ${{github.workspace}}/hsds/hsds_root | ||
BUCKET_NAME: hsds_bucket | ||
HS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock | ||
HS_ENDPOINT: http://127.0.0.1:5101 | ||
H5PYD_TEST_FOLDER: /home/test_user1/h5pyd_tests/ | ||
|
||
jobs: | ||
build-and-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest,] | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
@@ -62,29 +62,64 @@ jobs: | |
path: ${{github.workspace}}/hsds | ||
|
||
- name: Install HSDS | ||
working-directory: ${{github.workspace}}/hsds | ||
shell: bash | ||
run: | | ||
cd ${{github.workspace}}/hsds | ||
pip install -e . | ||
|
||
- name: Start HSDS | ||
shell: bash | ||
working-directory: ${{github.workspace}}/hsds | ||
run: | | ||
cd ${{github.workspace}}/hsds | ||
mkdir hsds_root | ||
mkdir hsds_root/hsds_bucket | ||
cp admin/config/groups.default admin/config/groups.txt | ||
cp admin/config/passwd.default admin/config/passwd.txt | ||
./runall.sh --no-docker 1 & | ||
sleep 11 # let the nodes get ready | ||
hsds --root_dir hsds_root --host localhost --port 5101 --password_file admin/config/passwd.txt --logfile hs.log --loglevel DEBUG --config_dir=admin/config --count=4 & | ||
|
||
- name: Wait for node startup | ||
shell: bash | ||
run: | | ||
sleep 30 | ||
|
||
- name: HSDS Setup | ||
shell: bash | ||
working-directory: ${{github.workspace}}/hsds | ||
run: | | ||
python tests/integ/setup_test.py | ||
|
||
- name: Create h5pyd test folder | ||
shell: bash | ||
env: | ||
HS_USERNAME: test_user1 | ||
HS_PASSWORD: test | ||
TEST2_USERNAME: test_user1 | ||
TEST2_PASSWORD: test | ||
run: | | ||
HS_USERNAME=test_user1 HS_PASSWORD=test TEST2_USERNAME=test_user1 TEST2_PASSWORD=test hstouch -v /home/test_user1/h5pyd_tests/ | ||
hstouch -v /home/test_user1/h5pyd_tests/ | ||
|
||
- name: Run h5pyd tests | ||
shell: bash | ||
id: h5pyd-tests | ||
env: | ||
HS_USERNAME: test_user1 | ||
HS_PASSWORD: test | ||
TEST2_USERNAME: test_user1 | ||
TEST2_PASSWORD: test | ||
run: | | ||
python testall.py | ||
|
||
- name: Show HSDS Logs on Fail | ||
working-directory: ${{github.workspace}}/hsds | ||
# Only run if the whole workflow failed due to h5pyd tests | ||
if: ${{failure() && steps.h5pyd-tests.outcome == 'failure'}} | ||
run: | | ||
cat hs.log | ||
|
||
- name: Run h5pyd tests with h5py | ||
env: | ||
HS_USERNAME: test_user1 | ||
HS_PASSWORD: test | ||
TEST2_USERNAME: test_user1 | ||
TEST2_PASSWORD: test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here too |
||
USE_H5PY: 1 | ||
run: | | ||
HS_USERNAME=test_user1 HS_PASSWORD=test TEST2_USERNAME=test_user1 TEST2_PASSWORD=test python testall.py | ||
python testall.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be test_user2