Integrations tests on PR: "Replace the version Chart with v4.2.1" by @VyacheslavSemin #104
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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} |