-
Notifications
You must be signed in to change notification settings - Fork 43
59 lines (52 loc) · 1.79 KB
/
eco-gotests-integration.yml
File metadata and controls
59 lines (52 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: eco-gotests integration
on:
workflow_call:
inputs:
branch:
description: Branch to run on
required: true
default: main
type: string
workflow_dispatch:
pull_request:
branches:
- main
- 'release-\d.\d\d'
jobs:
build:
runs-on: ubuntu-24.04
env:
SHELL: /bin/bash
ECO_GOTESTS_PATH: gotests
ECO_GOTESTS_REPO: rh-ecosystem-edge/eco-gotests
steps:
- name: Check out the eco-goinfra code
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
uses: actions/checkout@v6
with:
ref: ${{ inputs.branch || github.sha }}
- name: Set up Go
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Check out the eco-gotests code
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
uses: actions/checkout@v6
with:
repository: ${{ env.ECO_GOTESTS_REPO }}
# check out the branch name that is targeted by the PR
ref: ${{ github.base_ref }}
path: ${{ env.ECO_GOTESTS_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/rh-ecosystem-edge/eco-goinfra=${{ github.workspace }}
go mod tidy
go mod vendor
working-directory: ${{ env.ECO_GOTESTS_PATH }}
- name: eco-gotests go vet
if: ${{ !contains(github.event.*.labels.*.name, 'ignore-dep-check') }}
run: make vet
working-directory: ${{ env.ECO_GOTESTS_PATH }}