jrushford commented on a change in pull request #5706:
URL: https://github.com/apache/trafficcontrol/pull/5706#discussion_r609697489



##########
File path: .github/workflows/traffic-ops-ort-tests.yml
##########
@@ -0,0 +1,140 @@
+# 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: Traffic Ops ORT integration tests
+
+on: 
+  push:
+  workflow_dispatch:
+    paths:
+      - .github/actions/todb-init/**
+      - .github/workflows/traffic-ops-ort.yml
+      - go.mod
+      - go.sum
+      - GO_VERSION
+      - traffic_ops/*client/**.go
+      - traffic_ops/testing/api/**.go
+      - traffic_ops/traffic_ops_golang/**.go
+      - traffic_ops_ort/**.go
+      - vendor/**.go
+      - vendor/modules.txt
+  create:
+  pull_request:
+    paths:
+      - .github/actions/todb-init/**
+      - .github/workflows/traffic-ops-ort.yml
+      - go.mod
+      - go.sum
+      - GO_VERSION
+      - traffic_ops/*client/**.go
+      - traffic_ops/testing/api/**.go
+      - traffic_ops/traffic_ops_golang/**.go
+      - traffic_ops_ort/**.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
+      - 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
+
+  traffic_ops_ort:
+    if: github.event.pull_request.draft == false
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - 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
+    
+  trafficserver:
+    if: github.event.pull_request.draft == false
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: Build ATS RPM
+        uses: ./.github/actions/build-ats-test-rpm
+        env:
+          ATC_COMPONENT: ${{ github.job }}

Review comment:
       @zrhoffman good suggestion!  I've implemented this, caching the 
trafficserver rpm build between runs using the apache trafficserver branch 
commit SHA as the cache key.  This is working very well and shaves off about 10 
minutes from the workflow when there is a cache hit.  I added a new action, 
.github/actions/fetch-github-branch-sha.  It uses the GitHub API to fetch the 
SHA.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to