Skip to content

Commit

Permalink
Make go tests only run if relevant (#5569)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon authored Jun 19, 2023
1 parent 5008d7b commit 5af2ff7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 5af2ff7

Please sign in to comment.