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 12 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
Copy link

github-actions bot commented Mar 3, 2025

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

@moward98 moward98 force-pushed the morgan/150/example-test branch 3 times, most recently from df40bab to 337ab76 Compare March 3, 2025 15:58
@moward98 moward98 force-pushed the morgan/150/example-test branch from 337ab76 to 03e4e6e Compare March 3, 2025 16:41
@@ -35,7 +36,15 @@ jobs:
pip install pytest-asyncio &&
pip install pydantic &&
python -m pytest src/onepassword/test_client.py

- name: Example Test
if: matrix.os == 'ubuntu-latest'
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with Go comment, we are running this on 4 different python versions (should be 6 with 3.13 and 3.14) and will run 6 jobs on ubuntu running the example code still increasing the chances of a 409. We want to split this into a separate job and just run it on ubuntu and on a singular python version

Comment on lines +106 to +112
- name: Example Test
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
OP_VAULT_ID: ${{ secrets.TEST_SERVICE_ACCOUNT_VAULT_ID }}
run: |
pip install . &&
python example/example.py
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with above

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.

3 participants