Description
Recently, we added support for k3d (#466). To ensure no regression, we need to create a pipeline that will run on each PR and main branch. It will be exactly the same as we have with the kind.
|
integration-tests: |
|
name: Integration tests |
|
runs-on: ubuntu-latest |
|
if: github.event.pull_request.draft == false |
|
needs: [ push-apps, push-tests, build-cli ] |
|
permissions: |
|
contents: read |
|
env: |
|
CAPACT_BINARY: "${{ github.workspace}}/capact-linux-amd64" |
|
|
|
steps: |
|
- name: Checkout code |
|
uses: actions/checkout@v2 |
|
with: |
|
ref: ${{ github.event.pull_request.head.sha }} |
|
- name: Setup environment |
|
env: |
|
PR_NUMBER: ${{ github.event.pull_request.number }} |
|
run: | |
|
. ./hack/ci/setup-env.sh |
|
- name: Download Capact CLI |
|
uses: actions/download-artifact@v2 |
|
with: |
|
name: cli_${{github.sha}} |
|
path: ${{ github.workspace }} |
|
- name: Setup Capact CLI |
|
run: | |
|
chmod +x $CAPACT_BINARY |
|
$CAPACT_BINARY version |
|
- name: Setup Go |
|
uses: actions/setup-go@v2 |
|
with: |
|
go-version: ${{env.GO_VERSION}} |
|
- name: Run K8s Controller integration tests |
|
run: | |
|
make test-k8s-controller |
|
- name: Run cross-functional integration tests |
|
env: |
|
BUILD_IMAGES: "false" |
|
ARTIFACTS: "output/" |
|
DISABLE_MONITORING_INSTALLATION: "true" |
|
run: | |
|
make test-integration |
|
- name: Upload artifacts |
|
uses: actions/upload-artifact@v2 |
|
if: ${{ always() }} |
|
with: |
|
name: cluster_dump_${{github.sha}} |
|
path: "output" |
|
retention-days: 5 # Default 90 days |
|
- name: Delete Capact CLI artifact |
|
uses: geekyeggo/delete-artifact@v1 |
|
with: |
|
name: cli_${{github.sha}} |
We need to add it as a parallel step to the kind one.
AC
-
Integration test are executed on k3d cluster, if failed, pipeline should be red
-
Integration test on kind and k3d are run in parallel
-
Stretch:
Use preloaded images for our dependencies. We should build image tarball only if something was changed in deploy/kubernetes/charts. Later, this tarball can be used by k3d.
# Cache images
capact alpha archive-images helm -v --version @latest --helm-repo @latest --output ./archive.tar --save-component=neo4j,ingress-nginx,argo,cert-manager,kubed
# Preload images
DISABLE_MONITORING_INSTALLATION=true K3D_IMAGES_ARCHIVE=archive.tar CLUSTER_TYPE=k3d make test-integration
Not sure where this tarball should be stored, as we may run to GitHub cache limits: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy. Maybe it will be better to push it to our GCS.
Reason
Ensure no regression. Additionally, test which environment is more stable and faster.
Description
Recently, we added support for k3d (#466). To ensure no regression, we need to create a pipeline that will run on each PR and main branch. It will be exactly the same as we have with the kind.
capact/.github/workflows/pr-build.yaml
Lines 390 to 443 in fa6712d
We need to add it as a parallel step to the
kindone.AC
Integration test are executed on k3d cluster, if failed, pipeline should be red
Integration test on kind and k3d are run in parallel
Stretch:
Use preloaded images for our dependencies. We should build image tarball only if something was changed in
deploy/kubernetes/charts. Later, this tarball can be used by k3d.Not sure where this tarball should be stored, as we may run to GitHub cache limits: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy. Maybe it will be better to push it to our GCS.
Reason
Ensure no regression. Additionally, test which environment is more stable and faster.