Skip to content

Commit

Permalink
Merge pull request #255 from mjura/unit-tests-workflow
Browse files Browse the repository at this point in the history
Add unit test workflow for CI
  • Loading branch information
mjura authored Jan 5, 2024
2 parents 611dd1a + d806aeb commit 25ff40b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main
tags:
- 'v*'
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main
tags:
- "v*"
jobs:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Unit tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- uses: actions/[email protected]
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-test-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-test-go-${{ hashFiles('**/go.sum') }}
- name: Run tests
run: |
make test
2 changes: 1 addition & 1 deletion .github/workflows/update-rancher-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
ref:
description: "Branch to use for GitHub action workflow"
required: true
default: "master"
default: "main"
operator_path:
description: "Operator github repo for the workflow"
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-rancher-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
ref:
description: "Branch to use for GitHub action workflow"
required: true
default: "master"
default: "main"
rancher_ref:
description: "Submit PR against the following rancher/rancher branch (e.g. release/v2.7)"
required: true
Expand Down

0 comments on commit 25ff40b

Please sign in to comment.