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

ci: add eco-goinfra compatibility check #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/eco-goinfra-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: eco-goinfra integration

on:
workflow_dispatch:
pull_request:
branches:
- main
- 'release-\d.\d\d'

jobs:
build:
runs-on: ubuntu-22.04
env:
SHELL: /bin/bash
ECO_GOINFRA_PATH: goinfra
ECO_GOINFRA_REPO: openshift-kni/eco-goinfra

steps:
- name: Set up Go 1.22
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
uses: actions/setup-go@v5
with:
go-version: 1.22.3

- name: Check out the eco-goinfra code
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
uses: actions/checkout@v4

- name: Check out the eco-goinfra code
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
uses: actions/checkout@v4
with:
repository: ${{ env.ECO_GOINFRA_REPO }}
# check out the branch name that is targeted by the PR
ref: ${{ github.base_ref }}
path: ${{ env.ECO_GOINFRA_PATH }}

# Update the go.mod file in eco-gotests to include the current eco-goinfra code
- name: Update go.mod in eco-gotests
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
run: |
go mod edit -replace github.com/openshift-kni/eco-goinfra=${{ github.workspace }}/${{ env.ECO_GOINFRA_PATH }}
go mod tidy
go mod vendor

- name: eco-goinfra go vet
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
run: make vet
Loading