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

Add Github Actions to lint, test and produce code coverage #4

Merged
merged 4 commits into from
May 26, 2024

Conversation

ddl-ebrown
Copy link
Collaborator

@ddl-ebrown ddl-ebrown commented May 26, 2024

  • When run in CI, the coverage dir is missing for some reason, so
    gotestsum won't run properly

  • Emit junit output from make test-coverage

  • Since we don't yet have SDLC pipeline projects for Go libraries or
    for public projects, add in some limited CI validation for PRs to
    this repo including:

    • A build and test stage that generates binaries with the Makefile
      and runs make test-coverage to produce coverage (not currently
      used in CI)

      Also uploads these as artifacts

    • Linting through the golangci-lint Github Action

  • NOTE: intially use dorny/test-reporter which produces Github checks,
    which by design doesn't always attach to the right workflow - results
    may show up with golangci-lint. See

    Test report doesn't appear in expected place in GitHub UI dorny/test-reporter#67
    https://github.com/orgs/community/discussions/24616

    To resolve this, switch to a fork that uses summary instead:
    feat: add output to step summary phoenix-actions/test-reporting#21

  • Building on the prior CI changes to lint and produce test artifacts,
    use the action go-coverage-report to examine the cover.out file
    produced to generate a small coverage report

@ddl-ebrown ddl-ebrown changed the title Add Github Action for make test Add Github Actions lint and test May 26, 2024
@ddl-ebrown ddl-ebrown force-pushed the github-actions branch 8 times, most recently from 393ab1d to 645ff9a Compare May 26, 2024 16:07
 - When run in CI, the coverage dir is missing for some reason, so
   gotestsum won't run properly

 - Emit junit output from make test-coverage
@ddl-ebrown ddl-ebrown force-pushed the github-actions branch 6 times, most recently from d7eff0e to 0c8eb8b Compare May 26, 2024 20:52
 - Since we don't yet have SDLC pipeline projects for Go libraries or
   for public projects, add in some limited CI validation for PRs to
   this repo including:

   * A build and test stage that generates binaries with the Makefile
     *and* runs make test-coverage to produce coverage (not currently
     used in CI)

     Also uploads these as artifacts

   * Linting through the golangci-lint Github Action

 - NOTE: intially use dorny/test-reporter which produces Github checks,
   which by design doesn't always attach to the right workflow - results
   may show up with golangci-lint. See

   dorny/test-reporter#67
   https://github.com/orgs/community/discussions/24616

   To resolve this, switch to a fork that uses summary instead:
   phoenix-actions/test-reporting#21
@dominodatalab dominodatalab deleted a comment from github-actions bot May 26, 2024
 - Building on the prior CI changes to lint and produce test artifacts,
   use the action go-coverage-report to examine the cover.out file
   produced to generate a small coverage report
@ddl-ebrown ddl-ebrown changed the title Add Github Actions lint and test Add Github Actions to lint, test and produce code coverage May 26, 2024
@ddl-ebrown
Copy link
Collaborator Author

Code coverage won't work until at least one run has been merged

@ddl-ebrown ddl-ebrown merged commit 968e8a3 into master May 26, 2024
3 checks passed
@ddl-ebrown ddl-ebrown deleted the github-actions branch May 26, 2024 21:51
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

Successfully merging this pull request may close these issues.

1 participant