-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make go tests only run if relevant (#5569)
- Loading branch information
1 parent
5008d7b
commit 5af2ff7
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,27 @@ jobs: | |
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Get git diff | ||
uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/**.wasm | ||
**/**.go | ||
**/**.mod | ||
**/**.sum | ||
Makefile | ||
Dockerfile | ||
.github/workflows/test.yml | ||
- name: 🐿 Setup Golang | ||
uses: actions/setup-go@v4 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: "^1.20" | ||
- name: Display go version | ||
if: env.GIT_DIFF | ||
run: go version | ||
- name: Get data from build cache | ||
if: env.GIT_DIFF | ||
uses: actions/cache@v3 | ||
with: | ||
# In order: | ||
|
@@ -40,6 +54,7 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-go-${{ matrix.go-version }}- | ||
- name: Run unit tests | ||
if: env.GIT_DIFF | ||
run: make test-unit | ||
|
||
e2e: | ||
|