-
Notifications
You must be signed in to change notification settings - Fork 445
CNTRLPLANE-244: Enable initial GitHub Action jobs #5706
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: codespell | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| codespell: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Run Codespell with annotations | ||
| uses: codespell-project/actions-codespell@v2.1 | ||
| with: | ||
| skip: ./hack/tools/bin/codespell_dist,./docs/site/*,./vendor/*,./api/vendor/*,./hack/tools/vendor/*,./api/hypershift/v1alpha1/*,./support/thirdparty/*,./docs/content/reference/*,./hack/tools/bin/*,./cmd/install/assets/*,./go.sum,./hack/workspace/go.work.sum,./api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests,./hack/tools/go.mod,./hack/tools/go.sum | ||
| ignore_words_file: .codespellignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: golangci-lint | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| golangci-lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Go environment | ||
| uses: actions/setup-go@v5.3.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: Run golangci-lint | ||
| uses: golangci/golangci-lint-action@v6.5.0 | ||
| with: | ||
| args: --timeout=15m --config=.golangci.yml --issues-exit-code=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: make-verify | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| make-verify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Go environment | ||
| uses: actions/setup-go@v5.3.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: Run make verify | ||
| run: make verify | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: unit-test | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| jobs: | ||
| unit-test: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Go environment | ||
| uses: actions/setup-go@v5.3.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: false | ||
| - name: Run unit tests | ||
| run: go test -race -parallel=$(nproc) -count=1 -timeout=15m -coverprofile cover.out -covermode=atomic -coverpkg=./... ./... | ||
| - name: Check test coverage | ||
| uses: vladopajic/go-test-coverage@v2.12.0 | ||
| continue-on-error: true | ||
| with: | ||
| profile: cover.out | ||
| config: .testcoverage.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # (mandatory) | ||
| # Path to coverage profile file (output of `go test -coverprofile` command). | ||
| # | ||
| # For cases where there are many coverage profiles, such as when running | ||
| # unit tests and integration tests separately, you can combine all those | ||
| # profiles into one. In this case, the profile should have a comma-separated list | ||
| # of profile files, e.g., 'cover_unit.out,cover_integration.out'. | ||
| profile: cover.out | ||
|
|
||
| # (optional; but recommended to set) | ||
| # When specified reported file paths will not contain local prefix in the output. | ||
| local-prefix: "github.com/openshift/hypershift" | ||
|
|
||
| # Holds coverage thresholds percentages, values should be in range [0-100]. | ||
| threshold: | ||
| # (optional; default 0) | ||
| # Minimum coverage percentage required for individual files. | ||
| file: 70 | ||
|
|
||
| # (optional; default 0) | ||
| # Minimum coverage percentage required for each package. | ||
| package: 80 | ||
|
|
||
| # (optional; default 0) | ||
| # Minimum overall project coverage percentage required. | ||
| total: 95 | ||
|
|
||
| # Holds regexp rules which will override thresholds for matched files or packages | ||
| # using their paths. | ||
| # | ||
| # First rule from this list that matches file or package is going to apply | ||
| # new threshold to it. If project has multiple rules that match same path, | ||
| # override rules should be listed in order from specific to more general rules. | ||
| override: | ||
| # Increase coverage threshold to 100% for `foo` package | ||
| # (default is 80, as configured above in this example). | ||
| - path: ^pkg/lib/foo$ | ||
| threshold: 100 | ||
|
|
||
| # Holds regexp rules which will exclude matched files or packages | ||
| # from coverage statistics. | ||
| exclude: | ||
| # Exclude files or packages matching their paths | ||
| paths: | ||
| - \.pb\.go$ # excludes all protobuf generated files | ||
| - ^pkg/bar # exclude package `pkg/bar` | ||
|
|
||
| # File name of go-test-coverage breakdown file, which can be used to | ||
| # analyze coverage difference. | ||
| breakdown-file-name: '' | ||
|
|
||
| diff: | ||
| # File name of go-test-coverage breakdown file which will be used to | ||
| # report coverage difference. | ||
| base-breakdown-file-name: '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.