Skip to content

Support running services without TLS + test harness #119

Support running services without TLS + test harness

Support running services without TLS + test harness #119

Workflow file for this run

---
name: ci
on:
# Run on all PRs
pull_request:
env:
HELM_VERSION: v3.14.4
PYTHON_VERSION: 3.13
UV_VERSION: 0.5.3
jobs:
lint:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
with:
# Fetch the full history so that we can diff against the target branch
fetch-depth: 0
-
name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
-
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: true
-
name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
with:
version: v3.10.0
-
name: Lint
run: |
ct lint --config ct.yaml --helm-repo-extra-args "aserto-helm=-u gh -p ${READ_WRITE_TOKEN}"
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd "pg_isready -U $POSTGRES_USER"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
uses: actions/checkout@v4
-
name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
-
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: true
-
name: Install uv package manager
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
-
uses: AbsaOSS/k3d-action@v2
name: Create k8s cluster
with:
cluster-name: "test"
args: >
--agents 1
--k3s-arg "--disable=metrics-server@server:*"
-
name: Generate admin ssh key
id: sshkey
run: |
ssh-keygen -t ed25519 -N "" -f $HOME/.ssh/admin_ed25519
echo "public_key=$HOME/.ssh/admin_ed25519.pub" >> $GITHUB_OUTPUT
echo "private_key=$HOME/.ssh/admin_ed25519" >> $GITHUB_OUTPUT
-
name: Test Directory
env:
GITHUB_TOKEN: ${{ env.READ_WRITE_TOKEN }}
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
SSH_PUBLIC_KEY: ${{ steps.sshkey.outputs.public_key }}
SSH_PRIVATE_KEY: ${{ steps.sshkey.outputs.private_key }}
run: |
cd tools/ktest
uv run ktest.py ../../test/directory/tests.yaml