GoogleCloudPlatform / GoogleCloudPlatform/professional-services

most assets have unit tests but CI infra doesn't run them

Open
#459 8 comments 0 reactions 1 assignee Claimed by @tswast View on GitHub
Dominant language
Python
Stars
3.1k
Forks
1.5k
Avg merge
2d 8h
Merged PRs (30d)
44

Description

@morgante @AdrienWalkowiak @ryanmcdowell
would love your thoughts on how we might tackle this.

## Issue
Contributors write tests that are never run and sometimes we merge changes that break tests.
we should have a part of the CI process for running tests in these assets.

## Background
Mostly the repo seems to be (mostly) standardized on
mvn test
python unittest
go test

## Future state
### Test Discovery
Ideally we'd have a test discovery / running script in the CI tool similar to check_format.sh
However this is difficult to implement because each example / tool has different dependencies and sometimes use different build tools (npm, sbt, gradle, etc.)

### New Asset Bootstrapper
If we can align on approach we can write a "new tool / new example generator script that seeds a new directory w/ a template Make / Docker file, README, etc."

### Additional CI Check on PRs
For "every dir under tools / examples has Make / Docker / OWNERS / README

## More strict contribution guidelines requirements
I'd be interested in modifying the contribution guidelines so every new asset must have a Dockerfile / Makefile to run tests. This way discovery tool could just run `make test` in each directory. This would also make reviewers job easier to pull down and run tests (which I admittedly don't usually do).

Additionally, it feels like as we try to improve the quality / maintainability of this repo we should have an OWNERS file under each tool / example. It can be difficult the track down original authors to triage issues and it'd be nice to reach out to all owners for repo wide initiatives and say...

## Messaging
What's to best way to get this message out there (and do we agree with it): "Hey we all need to migrate out of exclusions list, add docker / make / owner files by end of 2020 and upgrade to python3 or your asset will be considered unmaintained and dropped from the repo"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.