Skip to content

Test jenkins pr trigger2 #182

Test jenkins pr trigger2

Test jenkins pr trigger2 #182

Workflow file for this run

#
# Copyright (c) 2020-2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: Pull Request Checks
on:
pull_request:
branches: [ main ]
jobs:
go:
name: Check go sources
runs-on: ubuntu-20.04
steps:
-
name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.20.12
-
name: Check out code into the Go module directory
uses: actions/checkout@v2
-
name: Cache go modules
id: cache-mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
name: Download dependencies
run: go mod download
if: steps.cache-mod.outputs.cache-hit != 'true'
-
name: Check go mod status
run: |
go mod tidy
if [[ ! -z $(git status -s) ]]
then
echo "Go mod state is not clean:"
git --no-pager diff
exit 1
fi
-
name: Check format
run: |
go install golang.org/x/tools/cmd/goimports@latest
make fmt
if [[ $? != 0 ]]
then
echo "not well formatted sources are found:"
git --no-pager diff
exit 1
fi
check-wto-controller:
name: Check WTO controller image
runs-on: ubuntu-latest
steps:
- name: Checkout web-terminal-operator source code
uses: actions/checkout@v2
- name: "Check WTO Controller image"
run: docker build -t wto-controller:test -f build/dockerfiles/controller.Dockerfile .