Skip to content

Update Go version to 1.22.1 #3979

Update Go version to 1.22.1

Update Go version to 1.22.1 #3979

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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: T3C Integration Tests
env:
ATS_VERSION: 9.2.x
RHEL_VERSION: 8
TARGET_ARCH: x86_64
on:
workflow_dispatch:
push:
paths:
- cache-config/**.go
- cache-config/testing/**
- .github/actions/build-ats-test-rpm/**
- .github/actions/cache-config-integration-tests/**
- .github/actions/repo-info/**
- .github/workflows/cache-config-tests.yml
- go.mod
- go.sum
- GO_VERSION
- lib/atscfg-go/**.go
- lib/go-atscfg/**.go
- '!**_test.go'
- 'cache-config/testing/**_test.go'
- 'traffic_ops/app/db/**'
- '!traffic_ops/app/db/**.md'
- traffic_ops/*client/**.go
- 'traffic_ops/install/**'
- traffic_ops/toclientlib/**.go
- traffic_ops/traffic_ops_golang/**.go
- vendor/**.go
- vendor/modules.txt
pull_request:
paths:
- cache-config/**.go
- cache-config/testing/**
- .github/actions/build-ats-test-rpm/**
- .github/actions/cache-config-integration-tests/**
- .github/actions/repo-info/**
- .github/workflows/cache-config-tests.yml
- go.mod
- go.sum
- GO_VERSION
- lib/atscfg-go/**.go
- lib/go-atscfg/**.go
- '!**_test.go'
- 'cache-config/testing/**_test.go'
- 'traffic_ops/app/db/**'
- '!traffic_ops/app/db/**.md'
- traffic_ops/*client/**.go
- 'traffic_ops/install/**'
- traffic_ops/toclientlib/**.go
- traffic_ops/traffic_ops_golang/**.go
- vendor/**.go
- vendor/modules.txt
types: [opened, reopened, ready_for_review, synchronize]
jobs:
traffic_ops:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Build RPM
uses: ./.github/actions/build-rpms
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
cache-config:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Build RPM
uses: ./.github/actions/build-rpms
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/trafficcontrol-${{ github.job }}-*.x86_64.rpm
trafficserver:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get expected RPM name
uses: ./.github/actions/repo-info
with:
owner: apache
repo: trafficserver
branch: ${{ env.ATS_VERSION }}
id: repo-info
- name: Check Cache
id: ats-rpm-cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/dist
key: ${{ steps.repo-info.outputs.expected-rpm-name }}-${{ hashFiles('cache-config/testing/docker/trafficserver/**') }}
- name: Build ATS RPM
if: steps.ats-rpm-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/build-ats-test-rpm
env:
ATC_COMPONENT: ${{ github.job }}
- name: Check ATS RPM name
run: |
set -o errexit -o nounset -o xtrace
actual_rpm_name="$(ls dist | grep -E '^trafficserver-[0-9.]+-[0-9]+\.[0-9a-f]+.el${{ env.RHEL_VERSION }}.${{ env.TARGET_ARCH }}.rpm$')"
[[ "${{ steps.repo-info.outputs.expected-rpm-name }}" == "$actual_rpm_name" ]]
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
cache-config_tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
needs:
- traffic_ops
- cache-config
- trafficserver
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download TO RPM
uses: actions/download-artifact@v2
with:
name: traffic_ops
path: ${{ github.workspace }}/cache-config/testing/docker/traffic_ops
- name: Download Cache Config RPM
uses: actions/download-artifact@v2
with:
name: cache-config
path: ${{ github.workspace }}/cache-config/testing/docker/ort_test
- name: Download ATS RPM
uses: actions/download-artifact@v2
with:
name: trafficserver
path: ${{ github.workspace }}/cache-config/testing/docker/yumserver/test-rpms
- name: Build cache config test containers
run: docker-compose -f ${{ github.workspace }}/cache-config/testing/docker/docker-compose.yml build --parallel
- name: Run cache config integration tests
uses: ./.github/actions/cache-config-integration-tests