Add test workflow #4
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
name: h5pyd CI | |
on: | |
push: | |
pull_request: | |
branches: [master] | |
env: | |
ADMIN_PASSWORD: admin | |
ADMIN_USERNAME: admin | |
USER_NAME: test_user1 | |
USER_PASSWORD: test | |
USER2_NAME: test_user2 | |
USER2_PASSWORD: test | |
HSDS_USERNAME: test_user1 | |
HSDS_PASSWORD: test | |
HSDS_PATH: /home/test_user1/ | |
HDF5_API_TEST_PATH_PREFIX: /home/test_user1/ | |
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock | |
HDF5_VOL_CONNECTOR: REST | |
ROOT_DIR: ${{github.workspace}}/hsdsdata | |
BUCKET_NAME: hsdstest | |
HS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock | |
HS_USERNAME: test_user1 | |
HS_PASSWORD: test | |
TEST2_USERNAME: test_user2 | |
TEST2_PASSWORD: test | |
H5PYD_TEST_FOLDER: h5pyd_tests | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest,] | |
python-version: ["3.10"] # ["3.8", "3.9", "3.10"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# - name: Lint with flake8 | |
# shell: bash | |
# run: | | |
# # stop the build if there are Python syntax errors or undefined names | |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
# flake8 . --count --max-complexity=10 --max-line-length=127 --statistics | |
- name: Install package | |
shell: bash | |
run: | | |
pip install -e . | |
- name: Checkout HSDS | |
uses: actions/checkout@v3 | |
with: | |
repository: HDFGroup/hsds | |
path: ${{github.workspace}}/hsds | |
- name: Install HSDS dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install HSDS | |
shell: bash | |
run: | | |
cd ${{github.workspace}}/hsds | |
pip install -e . | |
- name: Create h5pyd test folder | |
shell: bash | |
run: | | |
hstouch -v /h5pyd_tests | |
- name: Run h5pyd tests | |
shell: bash | |
run: | | |
python testall.py |