godev/cmd/telemetrygodev: skip tests in unintended environments

golang.org/x/telemetry/godev is a module that hosts code for the
telemetry.go.dev service. This module is not intended to work
standalone, but assumes the whole telemetry repo is cloned.
Running this service on platforms like android, ios, etc is not
our focus either. The production service is likely running on linux,
but we also want to be able to test, develop on darwin or windows.

* Skip platforms that are not likely used by x/telemetry/godev
contributors. e.g.  android, ios, ...
* Skip if 'go' is not available.
* Run go list to find x/telemetry module. When go list runs from
a directory under x/telemetry/godev, the command will return the
replaced directory path, which is also the repo root.

For golang/go#65549
For golang/go#65258

Change-Id: I88f5f51bd0f2c355975127e1fa9559394e307f97
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/563358
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2 files changed
tree: b8a907ce79d50afdca5beca8da4685e8758fd206
  1. cmd/
  2. config/
  3. counter/
  4. crashmonitor/
  5. godev/
  6. internal/
  7. upload/
  8. .dockerignore
  9. .eslintrc.json
  10. .gitignore
  11. .prettierrc.json
  12. .stylelintrc.json
  13. CONTRIBUTING.md
  14. doc.go
  15. go.mod
  16. go.sum
  17. LICENSE
  18. mode.go
  19. npm
  20. npx
  21. package-lock.json
  22. package.json
  23. PATENTS
  24. README.md
  25. tsconfig.json
  26. types.go
README.md

Go Telemetry

This repository holds the Go Telemetry server code and libraries.

Linting & Formatting

This repository uses eslint to format TS files, stylelint to format CSS files, and prettier to format TS, CSS, Markdown, and YAML files.

See the style guides:

It is encouraged that all TS and CSS code be run through formatters before submitting a change. However, it is not a strict requirement enforced by CI.

Installing npm Dependencies:

  1. Install docker
  2. Run ./npm install

Run ESLint, Stylelint, & Prettier

./npm run all

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/telemetry:” in the subject line, so it is easy to find.