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

.github/workflows: add a build and test workflows #8577

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Feb 18, 2025

Changes

Updated the GitHub Actions workflows to improve naming consistency and
add a new yamllint step. Renamed job names for clarity and removed
unnecessary environment variable in e2e-matrix.yml.

Ports most prow jobs into a set of workflows.

Signed-off-by: Vincent Demeester vdemeest@redhat.com

/kind misc

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/misc Categorizes issue or PR as a miscellaneuous one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 18, 2025
@vdemeester vdemeester force-pushed the worfklows-enhancements branch 5 times, most recently from 9ec5bd4 to 4e62157 Compare February 18, 2025 13:04
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 18, 2025
@vdemeester vdemeester force-pushed the worfklows-enhancements branch 6 times, most recently from 4ec92f8 to 08e535b Compare February 18, 2025 14:19
@vdemeester
Copy link
Member Author

This would remove the need for pull-tekton-pipeline-build-tests and pull-tekton-pipeline-unit-tests.

@vdemeester
Copy link
Member Author

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 18, 2025
@vdemeester vdemeester force-pushed the worfklows-enhancements branch 6 times, most recently from 4312ef5 to 658a6b1 Compare February 18, 2025 15:32
@vdemeester
Copy link
Member Author

Alright, it takes 27m to run everything.
@afrittoli I think it is ready 👼🏼

/unhold

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 18, 2025
@vdemeester
Copy link
Member Author

We would need to change the required builds though 🙃

@vdemeester vdemeester force-pushed the worfklows-enhancements branch from 658a6b1 to 3c62d9f Compare February 18, 2025 16:10
@vdemeester
Copy link
Member Author

Plumbing PR for this tektoncd/plumbing#2463

@abayer
Copy link
Contributor

abayer commented Feb 18, 2025

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abayer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 18, 2025
This commit introduces a new CI workflow in `.github/workflows/ci.yaml` that
handles build, linting, testing, and calls the e2e workflows. It optimizes
the CI pipeline by including caching mechanisms and consolidates previously
separate workflows.

The following changes have been made:
* Added a multi-stage CI workflow named `ci`.
* Introduced linting steps using tools like `gofmt`, `golangci-lint`,
  `yamllint` and `go-license` check.
* Incorporated build, unit tests, and generated code verification.
* Added a multi-arch build support configuration.
* Consolidated end-to-end tests via a workflow call in `e2e-matrix.yml`.

Additionally, the redundant `golangci-lint.yaml` workflow has been removed.
Support for a new test target `test-unit-verbose-and-race` is introduced in
the `Makefile`, and the Go toolchain in `go.mod` is updated from `go 1.22.3`
to `go 1.22.7`.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@vdemeester vdemeester force-pushed the worfklows-enhancements branch from 3c62d9f to 5c4068c Compare February 19, 2025 05:21
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 19, 2025
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thank you for this!
/lgtm

@@ -0,0 +1,110 @@
name: ci

on: [pull_request] # yamllint disable-line rule:truthy
Copy link
Member

Choose a reason for hiding this comment

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

NIT: would be nice to address the lint warnings eventually

go-version-file: "go.mod"
- name: build
run: |
make test-unit-verbose-and-race
Copy link
Member

Choose a reason for hiding this comment

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

Eventually, it would be nice to have all the jobs triggered via a make, for consistency and for ensuring users can run all these locally. I guess that would mean we would need some make equivalent of the setup-go action :]

Comment on lines +106 to +107
KO_DOCKER_REPO=example.com ko resolve -l 'app.kubernetes.io/component!=resolvers' --platform=all --push=false -R -f config 1>/dev/null
KO_DOCKER_REPO=example.com ko resolve --platform=all --push=false -f config/resolvers 1>/dev/null
Copy link
Member

Choose a reason for hiding this comment

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

NIT: I'm not sure this needs to be separated anymore, resolvers are an integral part of our releases now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants