File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Integration
22on :
33 pull_request :
4- paths-ignore :
5- - ' **.md'
64 push :
75 paths-ignore :
86 - ' **.md'
1715 matrix : ${{ steps.set-matrix.outputs.matrix }}
1816 steps :
1917 - uses : actions/checkout@v2
18+ - uses : technote-space/get-diff-action@v4
19+ with :
20+ PATTERNS : |
21+ **/**.go
22+ go.mod
23+ go.sum
2024 - name : Finding files and store to output
2125 id : set-matrix
2226 run : echo "::set-output name=matrix::$({ cd integration && find . -type d -maxdepth 1 -print; } | tail -n +2 | cut -c 3- | jq -R . | jq -cs .)"
2529 name : test ${{ matrix.test-path }}
2630 runs-on : ubuntu-latest
2731 needs : pre-test
28- if : fromJSON(needs.pre-test.outputs.matrix)[0] != null
32+ if : env.GIT_DIFF && fromJSON(needs.pre-test.outputs.matrix)[0] != null
2933 continue-on-error : false
3034 strategy :
3135 fail-fast : true
Original file line number Diff line number Diff line change 11name : Test
22on :
33 pull_request :
4- paths-ignore :
5- - ' **.md'
64 push :
75 paths-ignore :
86 - ' **.md'
@@ -15,21 +13,22 @@ jobs:
1513 runs-on : ubuntu-latest
1614 timeout-minutes : 6
1715 steps :
18- - name : Set up Go
19- uses : actions/setup-go@v2
20- with :
21- go-version : 1.16
2216 - uses : actions/checkout@v2
2317 - uses : technote-space/get-diff-action@v4
2418 with :
2519 PATTERNS : |
2620 **/**.go
2721 go.mod
2822 go.sum
23+ - name : Set up Go
24+ uses : actions/setup-go@v2
25+ if : env.GIT_DIFF
26+ with :
27+ go-version : 1.16
2928 - uses : golangci/golangci-lint-action@master
29+ if : env.GIT_DIFF
3030 with :
3131 # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
3232 version : v1.37
3333 args : --timeout 10m
3434 github-token : ${{ secrets.github_token }}
35- if : env.GIT_DIFF
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ name: Test
22
33on :
44 pull_request :
5- paths-ignore :
6- - ' **.md'
75 push :
86 paths-ignore :
97 - ' **.md'
1513 runs-on : ubuntu-latest
1614 steps :
1715 - uses : actions/checkout@v2
16+ - uses : technote-space/get-diff-action@v4
17+ with :
18+ PATTERNS : |
19+ **/**.go
20+ go.mod
21+ go.sum
1822 - uses : actions/setup-go@v2
23+ if : env.GIT_DIFF
1924 with :
2025 go-version : 1.16
21- - run : ./scripts/test-unit
26+ - run : ./scripts/test-unit
27+ if : env.GIT_DIFF
28+
You can’t perform that action at this time.
0 commit comments