generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from Disper/github_action_test_runner
GitHub action test runner
- Loading branch information
Showing
1 changed file
with
37 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Run unit tests | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# Trigger for Pull Request | ||
branches: [ "main" ] | ||
permissions: | ||
contents: read | ||
jobs: | ||
# lint: | ||
############################################################################################ | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
############################################################################################ | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
############################################################################################ | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
/home/runner/work/cluster-inventory/cluster-inventory/bin | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
############################################################################################ | ||
- name: Set up go environment | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21 | ||
############################################################################################ | ||
- name: Run unit tests | ||
run: make test |