Skip to content

added integration tests #13

added integration tests

added integration tests #13

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus
name: Conformance tests
permissions: {}
on:
pull_request:
branches:
- "main"
- "release*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
chainsaw-tests:
runs-on: ubuntu-latest
permissions:
packages: read
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# install tools
- name: Install helm
id: helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
# install go
- name: Install go
uses: actions/setup-go@v5
with:
go-version: '1.21.7' # The Go version to download (if necessary) and use.
# install chainsaw
- name: Install chainsaw
uses: kyverno/action-install-chainsaw@8307cf9038333ce168dd4339ae24f9ab16ab7a00 # v0.1.4
# create kind cluster
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
# - name: Run Tests
# uses: BerniWittmann/background-server-action@v1
# with:
# start: |
# make install
# make run &
# wait-on: 'http://localhost:8081/readyz'
# wait-on-timeout: 200s
# command: sleep 1
- name: start server
run: |
make install
make run &
- name: Wait for server to start
run: |
until $(wget http://localhost:8081/readyz); do
echo 'Waiting for the server to start...'
sleep 5
done
- name: Run Tests
run: |
sleep 10
chainsaw test --test-dir=tests/controllers/ --config tests/chainsaw-config.yaml