-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (80 loc) · 2.93 KB
/
pr-checks.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
name: PR checks
on:
pull_request: {}
push:
branches:
- main
jobs:
it_runs:
name: Run tests against reference implementation
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: "x64"
- name: Setup Carvel
uses: vmware-tanzu/carvel-setup-action@v1
- name: Checkout code
uses: actions/checkout@v4
- name: Install kind
run: |
cd $(mktemp -d -t kind.XXXX)
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-$(go env GOHOSTOS)-$(go env GOHOSTARCH)
chmod +x ./kind
sudo mv ./kind /usr/local/bin
cd -
- name: Load dependencies
env:
IMAGE_REF: ghcr.io/${{ github.repository }}/generic-test-app:main
run: |
docker build -t $IMAGE_REF resources/apps/generic-test-app
kind create cluster
kind load docker-image $IMAGE_REF
# install the reference implementation
kapp deploy -y -a cert-manager -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml
kapp deploy -y -a servicebinding-runtime -f https://github.com/servicebinding/runtime/releases/download/v0.3.0/servicebinding-runtime-v0.3.0.yaml -f https://github.com/servicebinding/runtime/releases/download/v0.3.0/servicebinding-workloadresourcemappings-v0.3.0.yaml
- name: Conformance tests
run: .github/resources/run_ci.sh
- name: Collect diagnostics
run: |
set +o errexit
set -o nounset
set +o pipefail
echo "##[group]kubectl get all -n servicebindings-cts"
kubectl get all -n servicebindings-cts
echo "##[endgroup]"
echo "##[group]kubectl describe deployments.apps -n servicebindings-cts"
kubectl describe deployments.apps -n servicebindings-cts
echo "##[endgroup]"
echo "##[group]kubectl get servicebindings.servicebinding.io -A"
kubectl get servicebindings.servicebinding.io -A
echo "##[endgroup]"
echo "##[group]kubectl describe servicebindings.servicebinding.io -A"
kubectl describe servicebindings.servicebinding.io -A
echo "##[endgroup]"
echo "##[group]kubectl get clusterworkloadresourcemappings.servicebinding.io"
kubectl get clusterworkloadresourcemappings.servicebinding.io
echo "##[endgroup]"
if: always()
continue-on-error: true
linting:
name: Lint checks
runs-on: ubuntu-20.04
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: "x64"
- name: Checkout code
uses: actions/checkout@v4
- name: Shellcheck
uses: redhat-plumbers-in-action/differential-shellcheck@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run linting checks
run: |
./setup.sh
hack/lint-python-code.sh