Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make go tests only run if relevant #5569

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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