forked from package-operator/package-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (81 loc) · 2.11 KB
/
testing.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Testing
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
lint-and-unit:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '>=1.20.0'
- uses: actions/cache@v3
with:
path: |
~/.cache/package-operator
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
run: ./mage test:lint
- name: Unit
run: ./mage test:unit
- name: Archive cluster logs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: unit-test-results
path: .cache/unit
integration:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '>=1.20.0'
- uses: actions/cache@v3
with:
path: |
~/.cache/package-operator
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Kubectl Package Suite
run: ./mage test:integration kubectl-package
env:
CONTAINER_RUNTIME: docker
- name: Package Operator Suite
run: ./mage test:integration package-operator-local
env:
CONTAINER_RUNTIME: docker
- name: Archive cluster logs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: integration-test-results
path: .cache/integration
- name: Archive cluster logs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: cluster-logs
path: .cache/dev-env-logs