Skip to content
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

Fix path #10

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading