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

Unit tests #94

Merged
merged 5 commits into from
Jul 12, 2021
Merged

Unit tests #94

merged 5 commits into from
Jul 12, 2021

Conversation

dinagraves
Copy link
Contributor

@dinagraves dinagraves commented Jul 8, 2021

Simple unit test execution. Created two triggers - one for the website directory and one for content-api.

Alternatively, should this be moved to GitHub Actions? The logs are not easily viewable from GitHub.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 8, 2021
@ace-n
Copy link
Contributor

ace-n commented Jul 8, 2021

I'm +1 on GitHub Actions; the lack of a clear pass/fail indicator (e.g. on this build) hurts my eyes. 😬

@dinagraves
Copy link
Contributor Author

I'm +1 on GitHub Actions; the lack of a clear pass/fail indicator (e.g. on this build) hurts my eyes. 😬

Ah that's because it wasn't supposed to run on this PR because we didn't edit the website or api directories! It's a little annoying that it shows up with a grey symbol.

@grayside
Copy link
Collaborator

grayside commented Jul 9, 2021

Our current decision on CI tools is to use GitHub Actions for static analysis. Unit tests fall into a gray area. I'm in favor of inverting the decision a bit: using Cloud Build only when managing Google Cloud resources is required.

Given this is already implemented with Cloud Build, is there an advantage to keeping it in GCB we should be aware of as a trade-off?

@dinagraves
Copy link
Contributor Author

I think the only advantage is having more Cloud Build artifacts and use-cases covered. Maybe the right thing to do is to write a friction log highlighting the differences between Cloud Build and GitHub Actions for unit testing?

@dinagraves
Copy link
Contributor Author

dinagraves commented Jul 12, 2021

I propose merging this and then I'll re-implement it in GitHub Actions and write a friction log covering both pathways, covering:

  • Writing the config
  • Setting up the triggers
  • The feedback cycle in GitHub

@grayside
Copy link
Collaborator

grayside commented Jul 12, 2021

That sounds good, and will also make for a richer decision record.

My approach to 1P vs. 3rd Party includes a couple checks:

  • Will this add new tools/services/vendors to the project? If so prefer against.
  • Will this provide a better DevX or other advantages? If so prefer for.
  • Consistency is best effort.

Using our work here to point out needed product improvements is one of our goals.

Could you file follow-up issues for

  • the GitHub Actions implementation
  • removal of one of the implementations and create a decision record

@dinagraves
Copy link
Contributor Author

dinagraves commented Jul 12, 2021

Awesome! Filed issues to track. #102 and #103

@dinagraves dinagraves merged commit 140b7c0 into main Jul 12, 2021
engelke added a commit that referenced this pull request Jul 16, 2021
* Api cleanup (#92)

* Markdown API docs

* Refactored all resource methods to one package

* Restored accidentally deleted resources/base

* Partial separation of db access from methods

* DB separated from method handlers

* Added first test

* More tests

* API functionally complete per current spec

* Reformatted by black

* Delete ,

Inadvertent rename, later restored

* Address PR #92 comments

* Used existing helper method more often

* Respond to PR review

* Unit tests (#94)

* Unit tests

* Adding directory

* Using alpine image and installing pytest

* Using slim image instead

* Adding descriptive ID's for the steps

* productivity(terraform): correct terraform violations via PR suggestions (#98)

* productivity(terraform): correct terraform violations via PR suggestions (fixes #50)

* Switch to secrets.GITHUB_TOKEN

Co-authored-by: Dina Graves Portman <dinagraves@google.com>

Co-authored-by: Dina Graves Portman <dinagraves@google.com>

* Update decisions.md (#108)

New decision record

* Terraform and setup.sh (#93)

Initial terraform setup.

Co-authored-by: Dina Graves Portman <dinagraves@google.com>
Co-authored-by: Adam Ross <adamross@google.com>
engelke added a commit that referenced this pull request Jul 16, 2021
* OpenAPI spec and generated Python library

* More operations in spec

* Api cleanup (#92) (#101)

* Markdown API docs

* Refactored all resource methods to one package

* Restored accidentally deleted resources/base

* Partial separation of db access from methods

* DB separated from method handlers

* Added first test

* More tests

* API functionally complete per current spec

* Reformatted by black

* Delete ,

Inadvertent rename, later restored

* Address PR #92 comments

* Used existing helper method more often

* Respond to PR review

* OpenAPI complete, not finished

* Client library generated

* Update branch to match main (#113)

* Api cleanup (#92)

* Markdown API docs

* Refactored all resource methods to one package

* Restored accidentally deleted resources/base

* Partial separation of db access from methods

* DB separated from method handlers

* Added first test

* More tests

* API functionally complete per current spec

* Reformatted by black

* Delete ,

Inadvertent rename, later restored

* Address PR #92 comments

* Used existing helper method more often

* Respond to PR review

* Unit tests (#94)

* Unit tests

* Adding directory

* Using alpine image and installing pytest

* Using slim image instead

* Adding descriptive ID's for the steps

* productivity(terraform): correct terraform violations via PR suggestions (#98)

* productivity(terraform): correct terraform violations via PR suggestions (fixes #50)

* Switch to secrets.GITHUB_TOKEN

Co-authored-by: Dina Graves Portman <dinagraves@google.com>

Co-authored-by: Dina Graves Portman <dinagraves@google.com>

* Update decisions.md (#108)

New decision record

* Terraform and setup.sh (#93)

Initial terraform setup.

Co-authored-by: Dina Graves Portman <dinagraves@google.com>
Co-authored-by: Adam Ross <adamross@google.com>

Co-authored-by: Dina Graves Portman <dinagraves@google.com>
Co-authored-by: Adam Ross <adamross@google.com>
grayside pushed a commit that referenced this pull request Jul 22, 2021
* Unit tests

* Adding directory

* Using alpine image and installing pytest

* Using slim image instead

* Adding descriptive ID's for the steps
grayside added a commit that referenced this pull request Jul 22, 2021
* OpenAPI spec and generated Python library

* More operations in spec

* Api cleanup (#92) (#101)

* Markdown API docs

* Refactored all resource methods to one package

* Restored accidentally deleted resources/base

* Partial separation of db access from methods

* DB separated from method handlers

* Added first test

* More tests

* API functionally complete per current spec

* Reformatted by black

* Delete ,

Inadvertent rename, later restored

* Address PR #92 comments

* Used existing helper method more often

* Respond to PR review

* OpenAPI complete, not finished

* Client library generated

* Update branch to match main (#113)

* Api cleanup (#92)

* Markdown API docs

* Refactored all resource methods to one package

* Restored accidentally deleted resources/base

* Partial separation of db access from methods

* DB separated from method handlers

* Added first test

* More tests

* API functionally complete per current spec

* Reformatted by black

* Delete ,

Inadvertent rename, later restored

* Address PR #92 comments

* Used existing helper method more often

* Respond to PR review

* Unit tests (#94)

* Unit tests

* Adding directory

* Using alpine image and installing pytest

* Using slim image instead

* Adding descriptive ID's for the steps

* productivity(terraform): correct terraform violations via PR suggestions (#98)

* productivity(terraform): correct terraform violations via PR suggestions (fixes #50)

* Switch to secrets.GITHUB_TOKEN

Co-authored-by: Dina Graves Portman <dinagraves@google.com>

Co-authored-by: Dina Graves Portman <dinagraves@google.com>

* Update decisions.md (#108)

New decision record

* Terraform and setup.sh (#93)

Initial terraform setup.

Co-authored-by: Dina Graves Portman <dinagraves@google.com>
Co-authored-by: Adam Ross <adamross@google.com>

Co-authored-by: Dina Graves Portman <dinagraves@google.com>
Co-authored-by: Adam Ross <adamross@google.com>
@dinagraves dinagraves deleted the unit-tests branch September 17, 2021 00:04
@grayside grayside added this to the v0.5.0 milestone Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants