-
Notifications
You must be signed in to change notification settings - Fork 176
[Devfile#1721] Adding renovate.json and test script to ensure sample can still be parsed and used by consumers for go sample #45
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
4 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,32 @@ | ||
| # This workflow will build a golang project | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
|
||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v4 | ||
| with: | ||
| go-version-file: "go.mod" | ||
|
|
||
| - name: Build | ||
| run: go build -v ./... | ||
|
|
||
| - name: Test | ||
| run: go test -v ./... | ||
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,88 @@ | ||
| name: Validate with Devfile Registry Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| MINIKUBE_VERSION: 'v1.29.0' | ||
| MINIKUBE_RESOURCES: '--memory 14gb --cpus 4' | ||
| KUBERNETES_VERSION: 'v1.25.2' | ||
| TEST_DELTA: false | ||
| REGISTRY_PATH: ${{ github.workspace }}/registry | ||
| GO_VERSION: '1.23' | ||
| GINKGO_VERSION: v2.19.0 | ||
| YQ_VERSION: v4.44.1 | ||
|
|
||
| jobs: | ||
| validate-devfile-schema: | ||
| name: validate devfile schemas | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout current repo | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| path: current-repo | ||
|
|
||
| - name: Checkout devfile registry | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| repository: devfile/registry | ||
| path: ${{ env.REGISTRY_PATH }} | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Install yq | ||
| run: | | ||
| curl -sL -O https://github.com/mikefarah/yq/releases/download/${{ env.YQ_VERSION }}/yq_linux_amd64 -o /usr/local/bin/yq && mv ./yq_linux_amd64 /usr/local/bin/yq && chmod +x /usr/local/bin/yq | ||
|
|
||
| - name: Install Ginkgo | ||
| run: go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }} | ||
|
|
||
| - name: Validate sample | ||
| run: (cd ${{ env.REGISTRY_PATH }} && bash tests/validate_devfile_schemas.sh --stacksPath ${{ github.workspace }} --stackDirs current-repo) | ||
|
|
||
| non-terminating: | ||
| name: check for non-terminating images | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| path: current-repo | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Checkout devfile registry | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| repository: devfile/registry | ||
| path: ${{ env.REGISTRY_PATH }} | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Setup Minikube | ||
| uses: manusa/actions-setup-minikube@0e8062ceff873bd77979f39cf8fd3621416afe4d # v2.13.0 | ||
| with: | ||
| minikube version: ${{ env.MINIKUBE_VERSION }} | ||
| kubernetes version: ${{ env.KUBERNETES_VERSION }} | ||
| driver: "docker" | ||
| github token: ${{ secrets.GITHUB_TOKEN }} | ||
| start args: "--addons=ingress ${{ env.MINIKUBE_RESOURCES }}" | ||
|
|
||
| - name: Check that containers components are non terminating | ||
| run: | | ||
| go build -C ${{ env.REGISTRY_PATH }}/tests/check_non_terminating -o flatten-parent | ||
| (cd ${{ env.REGISTRY_PATH }} && bash ${{ env.REGISTRY_PATH }}/tests/check_non_terminating.sh --stacksPath ${{ github.workspace }} --stackDirs current-repo) |
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,22 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
|
JslYoon marked this conversation as resolved.
|
||
| "extends": ["local>devfile-samples/.github:renovate-config"], | ||
| "enabledManagers": ["gomod", "dockerfile"], | ||
| "gomod": { | ||
| "fileMatch": ["go\\.mod$", "go\\.sum$"] | ||
| }, | ||
| "packageRules": [ | ||
| { | ||
| "matchManagers": ["gomod"], | ||
| "groupName": "go dependencies", | ||
| "groupSlug": "go-deps", | ||
| "commitMessageTopic": "Go {{depName}}" | ||
| }, | ||
| { | ||
| "matchManagers": ["dockerfile"], | ||
| "groupName": "dockerfile dependencies", | ||
| "groupSlug": "dockerfile-deps", | ||
| "commitMessageTopic": "Dockerfile {{depName}}" | ||
| } | ||
|
JslYoon marked this conversation as resolved.
|
||
| ] | ||
| } | ||
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.