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

Add automated testing with GitHub actions #45

Open
verkaufer opened this issue Dec 17, 2021 · 1 comment
Open

Add automated testing with GitHub actions #45

verkaufer opened this issue Dec 17, 2021 · 1 comment
Labels
tracked Issue is tracked in 1Password's internal ticketing system as well.

Comments

@verkaufer
Copy link
Member

verkaufer commented Dec 17, 2021

Summary

Testing the Ansible collection should follow the CI practices we have in other integration repositories. There are clearly defined steps for testing the collection, but we're still relying on manually running the tests locally.

Use cases

  • CI testing parity with our other integrations
  • Test a wider set of Ansible & Python versions without maintaining multiple pyenvs & virtualenvs on developer machines
  • Improve confidence in changes and make it easier to review community contributions

Proposed solution

I suggest the approach taken by icinga-director collection to run their sanity and integration tests. They define multiple Python and Ansible-core versions and let the GitHub action take care of setup and teardown.

Integration tests present a different obstacle. We would need to test Connect against a 1Password testing environment to get useful results. I believe the Connect Helm-Chart or K8s operator run an integration suite with an account in a test environment. Perhaps we can do something similar?

Then running the Connect service should be doable with a GitHub Action service container.

  • However, there are some issues with running Connect as a GHA service

Is there a workaround to accomplish this today?

We could continue testing manually, but that's not something we should encourage.

References & Prior Work

@verkaufer
Copy link
Member Author

Confirming the ansible-test sanity tests pass sounds like a good first step for this while we continue researching better integration test automations.

We'll want to split this issue into two:

  1. add automated ansible-test sanity tests
  2. add automated integration tests that spin up a Connect server and talk to a staging 1Password environment we control?
    • To avoid malicious actors we may want to restrict integration tests to only run after merging to main. That way we avoid drive-by PRs that could insert data into our staging 1Password environment

@edif2008 edif2008 added the tracked Issue is tracked in 1Password's internal ticketing system as well. label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracked Issue is tracked in 1Password's internal ticketing system as well.
Projects
None yet
Development

No branches or pull requests

2 participants