diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 583dff93..bf0656fb 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -16,8 +16,8 @@ jobs: steps: - name: 'Checkout Repository' uses: actions/checkout@v3 + - name: 'Dependency Review' - uses: actions/dependency-review-action@v1 + uses: actions/dependency-review-action@v4 with: - # verify=False is never used in HSDS - allow-ghsas: ["GHSA-9wx4-h78v-vm56"] + allow-ghsas: GHSA-9wx4-h78v-vm56 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 703bdc84..4e59c269 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -168,4 +168,74 @@ jobs: - name: Shut down Docker if: ${{matrix.build-method == 'docker' && matrix.os != 'windows-latest'}} run: | - ./stopall.sh \ No newline at end of file + ./stopall.sh + + build-and-test-socket: + 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 + + name: Test HSDS with socket + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.12"] + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - 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 package + shell: bash + run: | + pip install -e . + + # Requests 2.32.0 breaks requests-unixsocket, used by HSDS for socket connections + # - name: Fix requests version + # run: | + # pip install requests==2.31.0 + + - name: Run HSDS unit tests + shell: bash + run: | + pytest + + - name: Start HSDS + run: | + mkdir ${{github.workspace}}/hsdsdata + mkdir ${{github.workspace}}/hsdsdata/hsdstest + cp admin/config/groups.default admin/config/groups.txt + cp admin/config/passwd.default admin/config/passwd.txt + ROOT_DIR=${{github.workspace}}/hsdsdata ./runall.sh --no-docker 1 & + sleep 10 + + - name: Test HSDS setup + run: | + python tests/integ/setup_test.py + + - name: Test HSDS + run : | + python testall.py \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index acc295b8..969213ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,10 +48,11 @@ dependencies = [ "pyjwt", "pytz", "pyyaml", - "requests <= 2.32.2", + "requests <= 2.31.0", "requests-unixsocket", "simplejson", "s3fs", + "urllib3 < 2.0.0" ] [project.optional-dependencies] diff --git a/requirements.txt b/requirements.txt index d16cb14b..59b2a4af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,8 @@ psutil pyjwt pytz pyyaml -requests<=2.32.2 +requests<=2.31.0 requests-unixsocket simplejson s3fs +urllib3<2.0.0