Skip to content

Integrations tests on PR: "Add the ability to set up container lifecycle hooks" by @VyacheslavSemin #99

Integrations tests on PR: "Add the ability to set up container lifecycle hooks" by @VyacheslavSemin

Integrations tests on PR: "Add the ability to set up container lifecycle hooks" by @VyacheslavSemin #99

Workflow file for this run

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}