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

GitHub action test runner #17

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Changes from 2 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
37 changes: 37 additions & 0 deletions .github/workflows/run-tests.yaml
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