-
Notifications
You must be signed in to change notification settings - Fork 442
49 lines (45 loc) · 1.22 KB
/
unit-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Unit tests
on:
release:
types: [created]
pull_request:
branches:
- main
paths:
- "**.go"
- "!test/**" # exclude changes in e2e tests
- ".github/workflows/unit-tests.yaml"
- "hack/test.sh"
- "charts/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
helm-unit-tests:
name: Execute all helm tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm Unit Test Plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest
- name: Run Helm Unit Tests
run: |
helm unittest charts/eks -d
helm unittest charts/k3s -d
helm unittest charts/k0s -d
helm unittest charts/k8s -d
go-unit-test:
name: Execute all go tests
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: "1.21"
cache: false
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Execute unit tests
run: ./hack/test.sh