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

CI Pipeline Runs example/example.py #151

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

moward98
Copy link

@moward98 moward98 commented Jan 30, 2025

Altered logic in example/example.py to read the previously hardcoded vault_id from environment variables.

Added example/example.py to the validation workflow, and read OP_SERVICE_ACCOUNT_TOKEN and OP_VAULT_ID from GitHub secrets.

Altered the example client.secrets.resolve to resolve field from item created during the example.py item CRUD.

…ith parameters of created item. example.py reads vault id from env var. Call to run example.py added to pipeline
@moward98 moward98 self-assigned this Jan 30, 2025
@@ -20,6 +20,7 @@ jobs:
matrix:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a comment here since GitHub UI doesn't allow me to do this above - since this is no longer running only integration tests, let's rename it to test-trusted instead of integration-test-trusted.

Comment on lines +115 to +117
- run: |
echo "Example file ran successfully!"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this, as silence is golden.

Comment on lines +3 to +4
This folder contains a code snippet that demonstrates how to use the 1Password Python SDK to retrieve a secret from 1Password and export it as an environment variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test example does much more, though - have we copy pasted this from somewhere?

Comment on lines +5 to +15
## Prerequisites

1. Clone the repository and follow the steps to [get started](https://github.com/1Password/onepassword-sdk-python/blob/main/README.md).
2. Make sure to export a valid service account token. For example:
```bash
export OP_SERVICE_ACCOUNT_TOKEN="<your token>"
```
3. Make sure to export a valid vault uuid. For example:
```bash
export OP_VAULT_ID="<your vault uuid>"
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't actually explain how to run the example file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants