-
Notifications
You must be signed in to change notification settings - Fork 15
118 lines (114 loc) · 3.43 KB
/
test.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: "units-test"
on:
# works for mannual, in case of github agent updated.
# we can run mannually to see if it can be fixed by update version of
# - kubectl
# - k8s cluster provider's
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x
# test local cluster without prometheus grafana
test_local_cluster:
needs:
- shellcheck
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- cluster_provider: kind
prometheus_operator_version: v0.12.0
PROMETHEUS_ENABLE: false
GRAFANA_ENABLE: false
TEKTON_ENABLE: false
- cluster_provider: kind
prometheus_operator_version: v0.12.0
PROMETHEUS_ENABLE: true
GRAFANA_ENABLE: true
TEKTON_ENABLE: false
- cluster_provider: kind
prometheus_operator_version: v0.12.0
PROMETHEUS_ENABLE: false
GRAFANA_ENABLE: false
TEKTON_ENABLE: true
- cluster_provider: kind
prometheus_operator_version: v0.12.0
PROMETHEUS_ENABLE: true
GRAFANA_ENABLE: true
TEKTON_ENABLE: true
- cluster_provider: microshift
prometheus_operator_version: v0.12.0
PROMETHEUS_ENABLE: false
GRAFANA_ENABLE: false
TEKTON_ENABLE: false
- cluster_provider: microshift
prometheus_operator_version: v0.12.0
PROMETHEUS_ENABLE: true
GRAFANA_ENABLE: true
TEKTON_ENABLE: false
#- cluster_provider: microshift
# prometheus_operator_version: v0.12.0
# PROMETHEUS_ENABLE: false
# GRAFANA_ENABLE: false
# TEKTON_ENABLE: true
#- cluster_provider: microshift
# prometheus_operator_version: v0.12.0
# PROMETHEUS_ENABLE: true
# GRAFANA_ENABLE: true
# TEKTON_ENABLE: true
steps:
- uses: actions/checkout@v3
- name: start from local
run: |
export PROMETHEUS_ENABLE=${{matrix.PROMETHEUS_ENABLE}}
export PROMETHEUS_OPERATOR_VERSION=${{matrix.prometheus_operator_version}}
export GRAFANA_ENABLE=${{matrix.GRAFANA_ENABLE}}
export CLUSTER_PROVIDER=${{matrix.cluster_provider}}
export TEKTON_ENABLE=${{matrix.TEKTON_ENABLE}}
./main.sh prerequisites
./main.sh up
- name: verify
run: |
export CLUSTER_PROVIDER=${{matrix.cluster_provider}}
./verify.sh
containertestubuntu:
needs:
- shellcheck
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- OS: ubuntu
- OS: fedora
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v8.1.5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: test image with container
uses: docker/build-push-action@v5
with:
context: .
file: ./test/${{matrix.OS}}.Dockerfile
platforms: linux/amd64
#,linux/arm64,linux/s390x later
push: false
tags: testcontainer:latest