Skip to content

Commit

Permalink
NXPY-253: Restore capability to use the client with a local HTTP serv…
Browse files Browse the repository at this point in the history
…er -rebased with master
  • Loading branch information
gitofanindya committed Feb 26, 2024
2 parents 0e33e97 + a7a95a0 commit 7675bf8
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
--health-retries 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -66,7 +66,7 @@ jobs:

- name: Upload coverage to Codecov
if: ${{ success() }} || ${{ failure() }}
uses: codecov/[email protected].2
uses: codecov/[email protected].5
with:
files: ./coverage.xml
flags: functional
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,33 @@ jobs:
name: Build pure wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: python -m pip install -U pip setuptools wheel
- run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: python-package-distributions
name: python-package-distributions-purebuilt
path: ./dist/*.whl

source-distribution:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: python setup.py sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: python-package-distributions
name: python-package-distributions-source
path: dist

publish:
Expand All @@ -44,12 +48,13 @@ jobs:
- source-distribution
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
name: python-package-distributions*
path: dist/
merge-multiple: true
- run: ls -l dist
- uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
--health-retries 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -66,7 +66,7 @@ jobs:

- name: Upload coverage to Codecov
if: ${{ success() }} || ${{ failure() }}
uses: codecov/[email protected].2
uses: codecov/[email protected].5
with:
files: ./coverage.xml
flags: unit
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ Changelog
Release date: ``2024-xx-xx``

- `NXPY-253 <https://jira.nuxeo.com/browse/NXPY-253>`__: Restore capability to use the client with a local HTTP server

- `NXPY-255 <https://jira.nuxeo.com/browse/NXPY-255>`__: Fix Test cases for moto3

Technical changes
-----------------

-
- Replaced mock_s3 with mock_aws in test_upload_s3.py

Minor changes
-----------------

-
- Upgraded `actions/checkout` from 3 to 4
- Upgraded `actions/download-artifact` from 3 to 4
- Upgraded `actions/upload-artifact` from 3 to 4
- Upgraded `actions/setup-python` from 4 to 5
- Upgraded `codecov/codecov-action` from 3.1.2 to 3.1.5
- Upgraded `pypa/gh-action-pypi-publish` from master to release/v1

6.1.1
-----
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_upload_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import boto3
import pytest
import requests.exceptions
from moto import mock_aws
from moto import mock_s3
from nuxeo.constants import UP_AMAZON_S3
from nuxeo.exceptions import HTTPError, UploadError
from nuxeo.handlers.s3 import ChunkUploaderS3, UploaderS3
Expand Down Expand Up @@ -38,7 +38,7 @@ def bucket():

@pytest.fixture
def s3(aws_credentials, bucket):
with mock_aws():
with mock_s3():
client = boto3.client(UP_AMAZON_S3, region_name="eu-west-1")

# Create a bucket
Expand Down

0 comments on commit 7675bf8

Please sign in to comment.