You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2023/01/19 04:27:13 UTC

[GitHub] [trafficcontrol] ericholguin opened a new pull request, #7298: Separate Go Unit GHA into individual workflows

ericholguin opened a new pull request, #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298

   <!--
   Thank you for contributing! Please be sure to read our contribution guidelines: https://github.com/apache/trafficcontrol/blob/master/CONTRIBUTING.md
   If this closes or relates to an existing issue, please reference it using one of the following:
   
   Closes: #ISSUE
   Related: #ISSUE
   
   If this PR fixes a security vulnerability, DO NOT submit! Instead, contact
   the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://apache.org/security regarding vulnerability disclosure.
   -->
   
   This PR separates all of the Go unit tests from the go.unit.tests.yml workflow into their own individual workflow files, this allows us to have more granular GHA badges in the ReadMe as well as only running the specific unit test when the associated files are changed.
   
   Few extra additions:
   - Run ALL of the cache-config unit tests not just t3c-generate
   - Added the v5 test files needed for the CiaB v5 TO integration tests to actually run.
   
   <!-- **^ Add meaningful description above** --><hr/>
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this PR.
   Feel free to add the name of a tool or script that is affected but not on the list.
   -->
   
   - CDN in a Box
   - GitHub Actions
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your PR.
   If your PR has tests (and most should), provide the steps needed to run the tests.
   If not, please provide step-by-step instructions to test the PR manually and explain why your PR does not need tests. -->
   
   Make sure GHA are successful
   
   ## PR submission checklist
   - [ ] This PR has tests <!-- If not, please delete this text and explain why this PR does not need tests. -->
   - [ ] This PR has documentation <!-- If not, please delete this text and explain why this PR does not need documentation. -->
   - [ ] This PR has a CHANGELOG.md entry <!-- A fix for a bug from an ATC release, an improvement, or a new feature should have a changelog entry. -->
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://apache.org/security) for details)
   
   <!--
   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.
   -->
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#issuecomment-1397722042

   > > Since we're running all Go unit tests on every Go-modifying PR, splitting the Go unit tests by component means occupying 6 runners for each such PR instead of 1, which is a lot of increased overhead, considering the shared Apache org's GHA runner pool, which would make sense if there was a corresponding very large benefit.
   > 
   > I think it already uses a runner per job, so we are already using 6 runners: https://docs.github.com/en/actions/using-workflows/about-workflows <-- See 2 under Workflow basics
   
   Oh, true. So this is a definite improvement.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ericholguin commented on pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
ericholguin commented on PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#issuecomment-1397520223

   > Since we're running all Go unit tests on every Go-modifying PR, splitting the Go unit tests by component means occupying 6 runners for each such PR instead of 1, which is a lot of increased overhead, considering the shared Apache org's GHA runner pool, which would make sense if there was a corresponding very large benefit.
   
   I think it already uses a runner per job, so we are already using 6 runners: https://docs.github.com/en/actions/using-workflows/about-workflows <-- See 2 under Workflow basics


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#issuecomment-1397743743

   > One thing Zach didn't mention: according to what I'm seeing here, the lib tests only run if code in the lib changes. But that library is linked to from, I think, every other Go component. So when lib changes, we need to run ALL of those tests, not just the lib tests. Also, things that depend on the Go client need to be re-tested when the Go client changes. I'm actually not sure that we're doing that today - but if not it's a gap in testing that should be closed.
   
   Looks like this is addressed, would you mind re-reviewing (and merging, if it's ready) @ocket8888?


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] codecov[bot] commented on pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#issuecomment-1396426348

   # [Codecov](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#7298](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e961611) into [master](https://codecov.io/gh/apache/trafficcontrol/commit/30437e364bc1462931fdf30d3e94419fe3b799a8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (30437e3) will **decrease** coverage by `2.07%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #7298      +/-   ##
   ============================================
   - Coverage     25.93%   23.86%   -2.07%     
     Complexity       98       98              
   ============================================
     Files           505      537      +32     
     Lines         65526    71958    +6432     
     Branches         90       90              
   ============================================
   + Hits          16992    17171     +179     
   - Misses        46885    53122    +6237     
   - Partials       1649     1665      +16     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | golib_unit | `53.01% <ø> (-0.01%)` | :arrow_down: |
   | grove_unit | `4.60% <ø> (ø)` | |
   | t3c_unit | `5.32% <ø> (?)` | |
   | traffic_monitor_unit | `20.43% <ø> (ø)` | |
   | traffic_ops_unit | `19.67% <ø> (ø)` | |
   | traffic_stats_unit | `10.41% <ø> (ø)` | |
   | unit_tests | `22.54% <ø> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [lib/go-atscfg/parentabstraction.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLWF0c2NmZy9wYXJlbnRhYnN0cmFjdGlvbi5nbw==) | `79.47% <0.00%> (-0.53%)` | :arrow_down: |
   | [cache-config/t3cutil/toreq/torequtil/torequtil.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzY3V0aWwvdG9yZXEvdG9yZXF1dGlsL3RvcmVxdXRpbC5nbw==) | `28.40% <0.00%> (ø)` | |
   | [cache-config/t3c-apply/util/util.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzYy1hcHBseS91dGlsL3V0aWwuZ28=) | `4.71% <0.00%> (ø)` | |
   | [cache-config/t3cutil/toreq/conversions.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzY3V0aWwvdG9yZXEvY29udmVyc2lvbnMuZ28=) | `0.00% <0.00%> (ø)` | |
   | [cache-config/t3c-request/config/config.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzYy1yZXF1ZXN0L2NvbmZpZy9jb25maWcuZ28=) | `0.00% <0.00%> (ø)` | |
   | [cache-config/t3c-apply/config/config.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzYy1hcHBseS9jb25maWcvY29uZmlnLmdv) | `0.00% <0.00%> (ø)` | |
   | [cache-config/t3c-update/config/config.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzYy11cGRhdGUvY29uZmlnL2NvbmZpZy5nbw==) | `0.00% <0.00%> (ø)` | |
   | [cache-config/t3c-update/t3c-update.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzYy11cGRhdGUvdDNjLXVwZGF0ZS5nbw==) | `0.00% <0.00%> (ø)` | |
   | [cache-config/t3c-check/t3c-check.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzYy1jaGVjay90M2MtY2hlY2suZ28=) | `0.00% <0.00%> (ø)` | |
   | [cache-config/t3cutil/toreq/toreqold/clientfuncs.go](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2FjaGUtY29uZmlnL3QzY3V0aWwvdG9yZXEvdG9yZXFvbGQvY2xpZW50ZnVuY3MuZ28=) | `0.00% <0.00%> (ø)` | |
   | ... and [23 more](https://codecov.io/gh/apache/trafficcontrol/pull/7298?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on code in PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#discussion_r1080801830


##########
infrastructure/cdn-in-a-box/traffic_ops_integration_test/Dockerfile:
##########
@@ -71,9 +71,11 @@ COPY ./infrastructure/cdn-in-a-box/traffic_ops/to-access.sh /opt/integration/app
 COPY ./infrastructure/cdn-in-a-box/traffic_ops_integration_test/config.sh /opt/integration/app/
 COPY ./traffic_ops/testing/api/v3/tc-fixtures.json /opt/integration/app/tc-fixtures-v3.json
 COPY ./traffic_ops/testing/api/v4/tc-fixtures.json /opt/integration/app/tc-fixtures-v4.json
+COPY ./traffic_ops/testing/api/v5/tc-fixtures.json /opt/integration/app/tc-fixtures-v5.json
 COPY --from=integration-builder \
     /go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api/traffic_ops_v3_integration_test \
     /go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api/traffic_ops_v4_integration_test \
+    /go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api/traffic_ops_v5_integration_test \

Review Comment:
   Good catch, that's been a lot of missing test coverage not running the v5 API tests when running from CiaB until now



##########
infrastructure/cdn-in-a-box/traffic_ops_integration_test/Dockerfile:
##########
@@ -46,7 +46,7 @@ WORKDIR /go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api
 RUN go mod vendor -v
 
 RUN set -o errexit -o xtrace;\
-    for api_version in v3 v4; do\
+    for api_version in v3 v4 v5; do\

Review Comment:
   `v3 v4 v5` can be `v{3..5}` like https://github.com/apache/trafficcontrol/blob/e9616117a52277f6d28bfee12873496d68e1ecae/infrastructure/cdn-in-a-box/traffic_ops_integration_test/run.sh#L45



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on code in PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#discussion_r1081967259


##########
.github/workflows/cache-config.unit.tests.yml:
##########
@@ -0,0 +1,84 @@
+# 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 Unit Tests
+
+env:
+  # alpine:3.13
+  ALPINE_VERSION: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
+
+on:
+  push:
+    paths:
+      - .github/actions/go-test/**
+      - .github/workflows/cache-config.unit.tests.yml
+      - go.mod
+      - go.sum
+      - GO_VERSION
+      - grove/**.go
+      - lib/**.go
+      - traffic_monitor/**.go
+      - cache-config/**.go
+      - traffic_ops/**.go
+      - traffic_stats/**.go
+      - vendor/**.go

Review Comment:
   Sure, that would work too



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ericholguin commented on pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
ericholguin commented on PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#issuecomment-1397379289

   > What is the goal of splitting the Go unit tests into components?
   
   Since we'd like to run all the unit tests regardless of files modified, the only goal would be to have separated badges, GitHub actions only have one badge per workflow, hence they all need a separate workflow. The value gain is that you'll be able to see which specific unit test failed at a glance without needing to click into the whole workflow. Also it would allow for Codecov badges to be added alongside to each of the unit workflow badges, showing the coverage for each unit tests and not the coverage as a whole.
   
   > Also, we shouldn't only run _some_ unit tests on a given PR, we should run all unit tests every time, which we can do because unit tests are almost always fast.
   
   Agreed, will fix that
   
   > If you feel strongly that we would still benefit from splitting them up by component, though, that could be done more succinctly using a GHA [matrix](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs) strategy. That way, we would still only need 1 workflow, even though it would still show up 6 times in the list of GHAs run.
   
   Again, the badge workflow issue, will explore if there is an alternative
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 merged pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
ocket8888 merged PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on code in PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#discussion_r1081956473


##########
.github/workflows/cache-config.unit.tests.yml:
##########
@@ -0,0 +1,84 @@
+# 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 Unit Tests
+
+env:
+  # alpine:3.13
+  ALPINE_VERSION: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
+
+on:
+  push:
+    paths:
+      - .github/actions/go-test/**
+      - .github/workflows/cache-config.unit.tests.yml
+      - go.mod
+      - go.sum
+      - GO_VERSION
+      - grove/**.go
+      - lib/**.go
+      - traffic_monitor/**.go
+      - cache-config/**.go
+      - traffic_ops/**.go
+      - traffic_stats/**.go
+      - vendor/**.go

Review Comment:
   Might be easier to just include `**.go` and exclude integration test sources like
   
   ```go
        - '!tc-health-client/testing/tests/**.go'
   ```
   ```



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ericholguin commented on a diff in pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
ericholguin commented on code in PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#discussion_r1081966622


##########
.github/workflows/cache-config.unit.tests.yml:
##########
@@ -0,0 +1,84 @@
+# 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 Unit Tests
+
+env:
+  # alpine:3.13
+  ALPINE_VERSION: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
+
+on:
+  push:
+    paths:
+      - .github/actions/go-test/**
+      - .github/workflows/cache-config.unit.tests.yml
+      - go.mod
+      - go.sum
+      - GO_VERSION
+      - grove/**.go
+      - lib/**.go
+      - traffic_monitor/**.go
+      - cache-config/**.go
+      - traffic_ops/**.go
+      - traffic_stats/**.go
+      - vendor/**.go

Review Comment:
   Or no exclusions and always run unit tests on any go file changes?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7298: Separate Go Unit GHA into individual workflows

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on code in PR #7298:
URL: https://github.com/apache/trafficcontrol/pull/7298#discussion_r1081956473


##########
.github/workflows/cache-config.unit.tests.yml:
##########
@@ -0,0 +1,84 @@
+# 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 Unit Tests
+
+env:
+  # alpine:3.13
+  ALPINE_VERSION: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
+
+on:
+  push:
+    paths:
+      - .github/actions/go-test/**
+      - .github/workflows/cache-config.unit.tests.yml
+      - go.mod
+      - go.sum
+      - GO_VERSION
+      - grove/**.go
+      - lib/**.go
+      - traffic_monitor/**.go
+      - cache-config/**.go
+      - traffic_ops/**.go
+      - traffic_stats/**.go
+      - vendor/**.go

Review Comment:
   Might be easier to just include `**.go` and exclude integration test sources like
   
   ```go
        - '!tc-health-client/testing/tests/**.go'
   ```



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org