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

Run unit-tests on CI and block PRs if tests fails #110

Closed
belimawr opened this issue Nov 16, 2023 · 4 comments
Closed

Run unit-tests on CI and block PRs if tests fails #110

belimawr opened this issue Nov 16, 2023 · 4 comments

Comments

@belimawr
Copy link
Contributor

It seems unit tests are not properly running on CI, recently we found a bug that would be caught by just running go test ./... on all supported OSes.
Ex: #109

Our BuildKite pipeline is only defining Linux and Windows machines, it should also define MacOS.

It also seems the BuildKite tests that do run are not preventing PRs from being merged. #103 did introduce an issue that caused the CI build to fail: https://buildkite.com/elastic/elastic-agent-system-metrics/builds/112#018bb435-2721-46d1-924b-d46b0bae356d, however this is not seen from the PR.

@jlind23
Copy link
Contributor

jlind23 commented Nov 16, 2023

Just added buildkite/elastic-agent-system-metrics as part of the required check in the branch protection rules for main

@jlind23 jlind23 closed this as completed Nov 16, 2023
@belimawr
Copy link
Contributor Author

We still need to enable running tests in MacOS, we could re-open this issue or create a new one, either way is fine for me.

I'm a BuildKite expert, but based on the pipeline definition I don't see the tests running on Windows:

- label: ":linux: Tests on Linux"
key: linux-test
command: ".buildkite/scripts/run-linux-tests.sh"
agents:
image: "${LINUX_AGENT_IMAGE}"
cpu: "8"
memory: "4G"
artifact_paths: "*.xml"
- label: ":windows: Tests on Windows"
key: windows-test
command: ".buildkite/scripts/run-win-tests.ps1"
agents:
provider: "gcp"
image: "${WINDOWS_AGENT_IMAGE}"
artifact_paths: "*.xml"

@cmacknz
Copy link
Member

cmacknz commented Nov 22, 2023

@belimawr open a new issue specifically for the additional platform support.

@belimawr
Copy link
Contributor Author

@belimawr open a new issue specifically for the additional platform support.

@cmacknz, it already got added: #112

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

No branches or pull requests

3 participants