diff --git a/.github/workflows/gofmt.yml b/.github/workflows/gofmt.yml index a5294a3..bada507 100644 --- a/.github/workflows/gofmt.yml +++ b/.github/workflows/gofmt.yml @@ -4,6 +4,9 @@ on: branches: - master pull_request: + paths: + - '.github/workflows/gofmt.yml' + - '**.go' jobs: gofmt: diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 55a5a2a..eb883c5 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -4,6 +4,13 @@ on: branches: - master pull_request: + paths: + - '.github/workflows/smoke**' + - '**Makefile' + - '**.go' + - '**.proto' + - 'go.mod' + - 'go.sum' jobs: smoke: @@ -20,6 +27,13 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: build run: make diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78d4220..fb8d0ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,13 @@ on: branches: - master pull_request: + paths: + - '.github/workflows/test.yml' + - '**Makefile' + - '**.go' + - '**.proto' + - 'go.mod' + - 'go.sum' jobs: test-linux: @@ -20,6 +27,13 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Build run: make all @@ -43,6 +57,13 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Build nebula run: go build ./cmd/nebula