Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

actions: run unit-tests and linting in GH actions#3138

Merged
v1v merged 13 commits intoelastic:mainfrom
v1v:feature/decouple-e2e-testing
Nov 7, 2022
Merged

actions: run unit-tests and linting in GH actions#3138
v1v merged 13 commits intoelastic:mainfrom
v1v:feature/decouple-e2e-testing

Conversation

@v1v
Copy link
Copy Markdown
Member

@v1v v1v commented Oct 19, 2022

What does this PR do?

Use GitHub actions for the static code analysis and unit tests
Bump go version

Why is it important?

This will help with running faster builds in the CI

Issue

Requires #3139

This will help with running faster builds
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Oct 19, 2022

This pull request does not have a backport label. Could you fix it @v1v? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify Bot added the backport-skip Skip notification from the automated backport with mergify label Oct 19, 2022
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Oct 19, 2022

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-11-07T09:25:42.430+0000

  • Duration: 57 min 7 sec

Test stats 🧪

Test Results
Failed 1
Passed 34
Skipped 0
Total 35

Test errors 1

Expand to view the tests failures

Initializing / End-To-End Tests / kubernetes-autodiscover_debian_10_amd64_elastic-agent / Logs collection from a pod with an init container – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.container.name:container-in-pod" 
    

  • no stacktrace

Steps errors 3

Expand to view the steps failures

Start Elastic Stack
  • Took 11 min 50 sec . View more details here
  • Description: make -C .ci start-elastic-stack
Run tests in the node
  • Took 16 min 34 sec . View more details here
  • Description: make -C .ci run-tests
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 2'

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 1

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_10_amd64_elastic-agent / Logs collection from a pod with an init container – elastic-agent standalone

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Comment thread .github/workflows/pull-request.yml Outdated
@v1v v1v changed the title actions: run uts, linting and docs in GH actions actions: run unit-tests and linting in GH actions Oct 19, 2022
Comment on lines +26 to +28
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0
go install golang.org/x/lint/golint
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force to bump the version to 1.18 so I could use go install

Comment thread .go-version
@@ -1 +1 @@
1.17
1.18
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should not cause any issues, but let's wait for the whole e2e-testing runs in the CI

Comment thread .pre-commit-config.yaml
(?x)^(
.*/?\.*.(tar.gz)
)$
- id: check-jjbb
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the dependency with the internal docker registry, as the docker image is in the private repo and vault/docker login with secrets won't work for PRs.

@v1v v1v marked this pull request as ready for review October 19, 2022 20:42
Comment on lines +13 to +18
pre-commit:
runs-on: ubuntu-latest
env:
JENKINS_URL: https://beats-ci.elastic.co/
steps:
- uses: actions/checkout@v3
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v1v v1v requested review from a team November 2, 2022 13:44
@v1v v1v self-assigned this Nov 2, 2022
@v1v v1v added backport-v7.17.0 Automated backport with mergify backport-v8.5.0 Automated backport with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Nov 2, 2022
Comment thread .github/workflows/junit-test-reporter.yml Outdated
Comment thread .github/workflows/junit-test-reporter.yml Outdated
Comment thread .github/workflows/junit-test-reporter.yml Outdated
Comment thread .github/workflows/pull-request.yml
Comment on lines +16 to +23
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@c9b3d0e2bd2a4e96aaf424dbaa31c46b42318226
with:
artifact: test-results # artifact name
name: JUnit Tests # Name of the check run which will be created
path: "**/*.xml" # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/workflows/junit-test-reporter.yml Outdated
@v1v v1v merged commit 4e9f87f into elastic:main Nov 7, 2022
mergify Bot pushed a commit that referenced this pull request Nov 7, 2022
(cherry picked from commit 4e9f87f)

# Conflicts:
#	.go-version
mergify Bot pushed a commit that referenced this pull request Nov 7, 2022
v1v added a commit that referenced this pull request Nov 7, 2022
(cherry picked from commit 4e9f87f)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
v1v pushed a commit that referenced this pull request Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport-v7.17.0 Automated backport with mergify backport-v8.5.0 Automated backport with mergify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants