File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 22# you can turn it on using a cron schedule for regular testing.
33#
44name : Tests
5+ permissions :
6+ contents : read
57on :
68 pull_request :
79 branches : [ master ]
2931concurrency : " TfAccTests"
3032
3133jobs :
34+ should_test :
35+ runs-on : ubuntu-latest
36+ outputs :
37+ run_tests : ${{ steps.filter.outputs.run_tests }}
38+ steps :
39+ - uses : dorny/paths-filter@v2
40+ id : filter
41+ with :
42+ filters : |
43+ run_tests:
44+ - '!CHANGELOG.md'
45+ - '!README.md'
46+ - '!website/**'
3247 # ensure the code builds...
3348 build :
49+ if : needs.should_test.outputs.run_tests == 'true'
50+ needs : should_test
3451 name : Build
3552 runs-on : ubuntu-latest
3653 timeout-minutes : 5
5370 go build -v .
5471 # run acceptance tests in a matrix with Terraform core versions
5572 test :
56- name : Matrix Test
73+ if : needs.should_test.outputs.run_tests == 'true'
5774 needs : build
75+ name : Matrix Test
5876 runs-on : ubuntu-latest
5977 timeout-minutes : 90
6078 strategy :
@@ -110,3 +128,10 @@ jobs:
110128 # disable go test timeout. We rely on GitHub action timeout.
111129 run : |
112130 go test -timeout 0 -v -cover ./sumologic/
131+ # skip acceptance tests
132+ skip :
133+ if : needs.should_test.outputs.run_tests != 'true'
134+ needs : should_test
135+ runs-on : ubuntu-latest
136+ steps :
137+ - run : echo "Skipping tests because only docs or website files changed."
You can’t perform that action at this time.
0 commit comments