Skip to content

E2E-Test

E2E-Test #13

Workflow file for this run

name: E2E-Test
on: workflow_dispatch
defaults:
run:
shell: bash
jobs:
run-e2e-test:
name: Run E2E Tests
runs-on: ubuntu-22.04
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build collector artifact
shell: bash
run: |
echo "Building collector artifact"
make build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build and push to local registry
uses: docker/build-push-action@v5
with:
context: ./bin
file: Dockerfile
push: true
tags: localhost:5000/collector:latest
- name: Install Chainsaw
uses: kyverno/[email protected]
- name: Create Kind Cluster
uses: ./.github/actions/create-cluster
with:
kind-version: "v0.18.0"
k8s-version: "v1.27.3"
runtime_tag: "latest"
cluster-name: "test-cluster"
- name: Setup Prometheus Node Exporter
uses: ./.github/actions/deploy-prometheus
- name: Deploy Collector
uses: ./.github/actions/deploy-collector
with:
collector-version: "latest"
DT_API_ENDPOINT: ${{ secrets.DT_API_ENDPOINT }}
DT_API_TOKEN: ${{ secrets.DT_API_TOKEN }}
- name: Run E2E Tests
env:
DT_API_ENDPOINT: ${{ secrets.DT_API_ENDPOINT }}
DT_API_TOKEN: ${{ secrets.DT_API_TOKEN }}
run: |
echo "Running E2E Tests"
chainsaw version
chainsaw test --test-dir ./testbed/chainsaw/ --config ./.chainsaw.yaml