Skip to content

Commit d59e7ec

Browse files
authored
fix the docs action check (#1)
1 parent dd0958a commit d59e7ec

3 files changed

Lines changed: 23 additions & 13 deletions

File tree

.github/workflows/test-integration.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Integration
22
on:
33
pull_request:
4-
paths-ignore:
5-
- '**.md'
64
push:
75
paths-ignore:
86
- '**.md'
@@ -17,6 +15,12 @@ jobs:
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 .)"
@@ -25,7 +29,7 @@ jobs:
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

.github/workflows/test-lint.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Test
22
on:
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

.github/workflows/test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Test
22

33
on:
44
pull_request:
5-
paths-ignore:
6-
- '**.md'
75
push:
86
paths-ignore:
97
- '**.md'
@@ -15,7 +13,16 @@ jobs:
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+

0 commit comments

Comments
 (0)