Skip to content

Commit

Permalink
Merge pull request #10 from vvarg229/fix-path
Browse files Browse the repository at this point in the history
Fix path
  • Loading branch information
roman-khimov authored Oct 24, 2023
2 parents b49a7f7 + 2756523 commit f0408dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,18 @@ runs:
shell: bash
env:
NEOFS_WALLET: ${{ inputs.NEOFS_WALLET }}
GITHUB_ACTION_PATH: ${{ github.action_path }}
run: |
echo "$NEOFS_WALLET" | base64 -d > wallet.json
echo "$NEOFS_WALLET" | base64 -d > "$GITHUB_ACTION_PATH/wallet.json"
- name: Prepare venv
shell: bash
id: prepare_venv
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
run: |
python3 -m venv venv
source venv/bin/activate && pip install -r requirements.txt
python3 -m venv "$GITHUB_ACTION_PATH/venv"
source "$GITHUB_ACTION_PATH/venv/bin/activate" && pip install -r "$GITHUB_ACTION_PATH/requirements.txt"
- name: Put files to NeoFS
shell: bash
Expand All @@ -90,10 +93,12 @@ runs:
NEOFS_ATTRIBUTES: ${{ inputs.NEOFS_ATTRIBUTES }}
URL_PREFIX: ${{ inputs.URL_PREFIX }}
LIFETIME: ${{ inputs.LIFETIME }}
GITHUB_ACTION_PATH: ${{ github.action_path }}
run: |
source venv/bin/activate && NEOFS_CLI_PASSWORD=$NEOFS_WALLET_PASSWORD python ./push-to-neofs.py \
source "$GITHUB_ACTION_PATH/venv/bin/activate" && NEOFS_CLI_PASSWORD=$NEOFS_WALLET_PASSWORD python "$GITHUB_ACTION_PATH/push-to-neofs.py" \
--lifetime "$LIFETIME" --neofs_domain "$NEOFS_NETWORK_DOMAIN" --attributes "$NEOFS_ATTRIBUTES" \
--cid "$STORE_OBJECTS_CID" --files-dir "$PATH_TO_FILES_DIR" --url_path_prefix "$URL_PREFIX" --wallet wallet.json
--cid "$STORE_OBJECTS_CID" --files-dir "$PATH_TO_FILES_DIR" --url_path_prefix "$URL_PREFIX" \
--wallet "$GITHUB_ACTION_PATH/wallet.json"
BASE_URL="https://$NEOFS_HTTP_GATE/$STORE_OBJECTS_CID"
if [ -z "$URL_PREFIX" ]; then
echo "container_url=$BASE_URL/" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion tests/test_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def download_file(url: str) -> str:
)
def test_file_content(base_url, report_dir, path):
if base_url is None:
pytest.skip("base_url is not provided. Provide it using --base_url option.")
pytest.fail("base_url is not provided. Provide it using --base_url option.")

if not base_url.endswith("/"):
base_url += "/"
Expand Down

0 comments on commit f0408dc

Please sign in to comment.