[8.8](backport #2431) Temporarily disable long running tests #7640
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] | |
env: | |
CONTAINER_SUFFIX: ${{ github.run_id }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
Lint: | |
# for more information see .pre-commit-config.yaml | |
name: Pre-commit Hooks | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Set up GO (with caching) | |
uses: magnetikonline/action-golang-cache@v4 | |
with: | |
go-version-file: .go-version | |
- name: Init Hermit | |
run: ./bin/hermit env -r >> $GITHUB_ENV | |
- name: Pre-commit Hooks | |
run: | | |
pre-commit run --all-files | |
shell: bash | |
- name: Mage Check | |
run: mage check | |
- name: Mage checkLicenseHeaders | |
run: mage checkLicenseHeaders | |
- name: Validate mocks | |
run: just validate-mocks | |
Build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 15 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Setup GO (with caching) | |
uses: magnetikonline/action-golang-cache@v4 | |
with: | |
go-version-file: .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@v2 | |
- name: Cache Build dependencies | |
uses: actions/cache@v3 | |
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@v4 | |
with: | |
context: . | |
file: ./deploy/Dockerfile | |
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@v4 | |
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@v3 | |
with: | |
path: /tmp/*.tar | |
key: ${{ runner.os }}-dockers-cache-${{ env.CONTAINER_SUFFIX }} | |
- name: Move cache | |
run: | | |
./.ci/scripts/gh-cache.sh | |
shell: bash |