-
Notifications
You must be signed in to change notification settings - Fork 26
85 lines (72 loc) · 2.29 KB
/
helm-test.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
name: Integrations test
run-name: >
Integrations tests on PR: "${{ github.event.pull_request.title }}" by @${{ github.actor }}
on:
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- '.github/**'
- '**/README.md'
- '**/CHANGELOG.md'
- '**/LICENSE'
permissions:
# All other permissions are set to none
contents: read
packages: read
env:
INSTALL_SCRIPT: './sources/litmus/deploy-${{ github.event.repository.name }}.sh'
K8S_STORAGE_CLASS: "standard"
NFS_PERSISTANCE_SIZE: "8Gi"
TARGET_BRANCH: ${{ github.base_ref }}
HEAD_BRANCH: ${{ github.head_ref }}
jobs:
selective-check:
name: selective-check
runs-on: ubuntu-latest
outputs:
images-present: ${{ steps.selective-check.outputs.images-present }}
steps:
- name: Checkout chart
uses: actions/checkout@v3
- name: selective-check
id: selective-check
run: |
tag=$(yq -r .docservice.image.tag ./values.yaml)
if docker buildx imagetools inspect onlyoffice/docs-docservice:${tag} > /dev/null; then
IMAGE_PRESENT=true
echo "Images present, continue..."
else
echo "Image not present, skip integration tests"
IMAGE_PRESENT=false
fi
echo "images-present=${IMAGE_PRESENT}" >> "$GITHUB_OUTPUT"
spin-up:
name: integration-test
runs-on: ubuntu-latest
needs: [selective-check]
if: needs.selective-check.outputs.images-present == 'true'
steps:
- name: Checkout chart
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true
- uses: azure/setup-helm@v3
id: setup-helm
with:
version: 'latest'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup minikube
id: minikube
uses: medyagh/setup-minikube@latest
with:
cpus: 2
memory: 6200
- name: Set up chart-testing
uses: helm/[email protected]
- name: Start deploy
run: |
export K8S_STORAGE_CLASS=${K8S_STORAGE_CLASS}
export NFS_PERSISTANCE_SIZE=${NFS_PERSISTANCE_SIZE}
bash ${INSTALL_SCRIPT} --target-branch ${TARGET_BRANCH}