Skip to content

Create go 1.19 stack versions #797

Create go 1.19 stack versions

Create go 1.19 stack versions #797

#
# Copyright 2021-2022 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Validate stacks
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: 0 5 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
MINIKUBE_VERSION: "v1.29.0"
KUBERNETES_VERSION: "v1.25.2"
TEST_DELTA: false
jobs:
validate-devfile-schema:
name: validate devfile schemas
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.19"
- name: Install Ginkgo
run: go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.5.0
- name: Test delta if on a pull request
if: ${{ github.event_name == 'pull_request' }}
run: echo "TEST_DELTA=true" >> $GITHUB_ENV
- name: Validate stacks
run: bash tests/validate_devfile_schemas.sh
non-terminating:
name: check for non-terminating images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: Setup Minikube
uses: manusa/actions-setup-minikube@3856c6fa039819f1c8e7e248b1fc5a8564e354c9 # v2.9.0
with:
minikube version: ${{ env.MINIKUBE_VERSION }}
kubernetes version: ${{ env.KUBERNETES_VERSION }}
driver: "docker"
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--addons=ingress"
- name: Test delta if on a pull request
if: ${{ github.event_name == 'pull_request' }}
run: echo "TEST_DELTA=true" >> $GITHUB_ENV
- name: Check that containers components are non terminating
run: bash tests/check_non_terminating.sh
odov2:
name: with odo v2
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: Setup Minikube
uses: manusa/actions-setup-minikube@3856c6fa039819f1c8e7e248b1fc5a8564e354c9 # v2.9.0
with:
minikube version: ${{ env.MINIKUBE_VERSION }}
kubernetes version: ${{ env.KUBERNETES_VERSION }}
driver: "docker"
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--addons=ingress"
- name: Install odo v2
uses: redhat-actions/openshift-tools-installer@2de9a80cf012ad0601021515481d433b91ef8fd5 # v1
with:
odo: "2.5.1"
- name: Check odo version
run: odo version
- name: Test delta if on a pull request
if: ${{ github.event_name == 'pull_request' }}
run: echo "TEST_DELTA=true" >> $GITHUB_ENV
- name: Check the devfile stacks with odo v2
run: bash tests/check_odov2.sh odo
odov3:
name: with odo v3
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: Setup Minikube
uses: manusa/actions-setup-minikube@3856c6fa039819f1c8e7e248b1fc5a8564e354c9 # v2.9.0
with:
minikube version: ${{ env.MINIKUBE_VERSION }}
kubernetes version: ${{ env.KUBERNETES_VERSION }}
driver: "docker"
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--addons=ingress"
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.19"
- name: Install odo v3
uses: redhat-actions/openshift-tools-installer@2de9a80cf012ad0601021515481d433b91ef8fd5 # v1
with:
odo: "3.15.0"
- name: Install Ginkgo
run: go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.5.0
- name: Check odo version
run: odo version
- name: Test delta if on a pull request
if: ${{ github.event_name == 'pull_request' }}
run: echo "TEST_DELTA=true" >> $GITHUB_ENV
- name: Check the devfile stacks with odo v3
run: bash tests/check_odov3.sh