[8.6](backport #2431) Temporarily disable long running tests #7638
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: Cloudbeat-CI | |
on: | |
pull_request: | |
branches: | |
- main | |
- '[0-9]+.[0-9]+' | |
types: [opened, synchronize, reopened] | |
push: | |
branches: | |
- main | |
- '[0-9]+.[0-9]+' | |
env: | |
CONTAINER_SUFFIX: ${{ github.run_id }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
Build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 15 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Init Hermit | |
run: ./bin/hermit env -r >> $GITHUB_ENV | |
- name: cache go dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
- name: build cloudbeat binary | |
uses: magefile/mage-action@v2 | |
with: | |
version: latest | |
args: build | |
- name: build opa bundle | |
uses: magefile/mage-action@v2 | |
with: | |
version: latest | |
args: BuildOpaBundle | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Build dependencies | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.workflow }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Build cloudbeat-docker | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: false | |
tags: cloudbeat:latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
outputs: type=docker,dest=/tmp/cloudbeat-${{ env.CONTAINER_SUFFIX }}.tar | |
- name: Build elastic-agent | |
run: | | |
make build_elastic_agent_docker_image | |
- name: Build pytest-docker | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./tests/. | |
push: false | |
tags: cloudbeat-test:latest | |
cache-from: type=local,mode=max,src=/tmp/.buildx-cache | |
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new | |
outputs: type=docker,dest=/tmp/pytest-${{ env.CONTAINER_SUFFIX }}.tar | |
- name: Cache docker images | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/*.tar | |
key: ${{ runner.os }}-dockers-cache-${{ env.CONTAINER_SUFFIX }} | |
- name: Move cache | |
run: | | |
./.ci/scripts/gh-cache.sh | |
shell: bash | |
Test_Matrix: | |
name: ${{ matrix.test-target }}-${{ matrix.range }}-tests | |
needs: [Build] | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 55 | |
strategy: | |
matrix: | |
include: | |
- test-target: post_merge_agent | |
range: '' | |
values_files: tests/deploy/values/ci-sa-agent.yml | |
- test-target: pre_merge | |
range: '' | |
- test-target: file_system_rules | |
range: '0..5' | |
- test-target: file_system_rules | |
range: '5..10' | |
- test-target: file_system_rules | |
range: '10..15' | |
- test-target: file_system_rules | |
range: '15..20' | |
- test-target: file_system_rules | |
range: '20..25' | |
- test-target: file_system_rules | |
range: '25..30' | |
- test-target: file_system_rules | |
range: '30..35' | |
- test-target: file_system_rules | |
range: '35..40' | |
- test-target: file_system_rules | |
range: '40..45' | |
- test-target: file_system_rules | |
range: '45..50' | |
- test-target: file_system_rules | |
range: '50..55' | |
- test-target: file_system_rules | |
range: '55..60' | |
- test-target: file_system_rules | |
range: '60..65' | |
- test-target: file_system_rules | |
range: '65..70' | |
- test-target: file_system_rules | |
range: '70..' | |
- test-target: k8s_object_rules | |
range: '0..6' | |
- test-target: k8s_object_rules | |
range: '6..12' | |
- test-target: k8s_object_rules | |
range: '12..18' | |
- test-target: k8s_object_rules | |
range: '18..' | |
- test-target: process_scheduler_rules | |
range: '0..3' | |
- test-target: process_scheduler_rules | |
range: '3..' | |
- test-target: process_api_server_rules | |
range: '0..5' | |
- test-target: process_api_server_rules | |
range: '5..10' | |
- test-target: process_api_server_rules | |
range: '10..15' | |
- test-target: process_api_server_rules | |
range: '15..20' | |
- test-target: process_api_server_rules | |
range: '20..24' | |
- test-target: process_api_server_rules | |
range: '24..28' | |
- test-target: process_api_server_rules | |
range: '28..32' | |
- test-target: process_api_server_rules | |
range: '32..36' | |
- test-target: process_api_server_rules | |
range: '36..40' | |
- test-target: process_api_server_rules | |
range: '40..44' | |
- test-target: process_api_server_rules | |
range: '44..48' | |
- test-target: process_api_server_rules | |
range: '48..52' | |
- test-target: process_api_server_rules | |
range: '52..56' | |
- test-target: process_api_server_rules | |
range: '56..' | |
- test-target: process_controller_manager_rules | |
range: '0..4' | |
- test-target: process_controller_manager_rules | |
range: '4..8' | |
- test-target: process_controller_manager_rules | |
range: '8..12' | |
- test-target: process_controller_manager_rules | |
range: '12..' | |
- test-target: process_etcd_rules | |
range: '0..4' | |
- test-target: process_etcd_rules | |
range: '4..8' | |
- test-target: process_etcd_rules | |
range: '8..12' | |
- test-target: process_etcd_rules | |
range: '12..' | |
- test-target: process_kubelet_rules | |
range: '0..4' | |
- test-target: process_kubelet_rules | |
range: '4..8' | |
- test-target: process_kubelet_rules | |
range: '8..12' | |
- test-target: process_kubelet_rules | |
range: '12..16' | |
- test-target: process_kubelet_rules | |
range: '16..20' | |
- test-target: process_kubelet_rules | |
range: '20..' | |
fail-fast: false | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Init Hermit | |
run: ./bin/hermit env -r >> $GITHUB_ENV | |
- name: Create k8s Kind Cluster | |
run: | | |
just create-kind-cluster | |
- name: Cache docker images | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/*.tar | |
key: ${{ runner.os }}-dockers-cache-${{ env.CONTAINER_SUFFIX }} | |
- name: Load images to kind | |
run: | | |
./.ci/scripts/kind-images.sh ${{ env.CONTAINER_SUFFIX }} kind-multi | |
shell: bash | |
- name: Deploy tests Helm chart | |
id: deploy_helm | |
run: | | |
just deploy-tests-helm ${{ matrix.test-target }} ${{ matrix.range }} ${{ matrix.values_file }} | |
- name: Run Tests | |
id: run_tests | |
run: | | |
just run-tests ${{ matrix.test-target }} | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure_results-${{ matrix.test-target}} | |
path: tests/allure/results/ | |
- name: clear cache | |
id: clear_cache | |
if: always() | |
run: rm -rf /tmp/*-${{ env.CONTAINER_SUFFIX }}.tar |