Skip to content

Support running services without TLS + test harness #128

Support running services without TLS + test harness

Support running services without TLS + test harness #128

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
env:
POSTGRES_PASSWORD: postgres
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: Deploy Postgres
run: |
helm install postgresql oci://registry-1.docker.io/bitnamicharts/postgresql \
--namespace postgres --create-namespace \
--set auth.postgresPassword=${{ env.POSTGRES_PASSWORD }}
echo "Waiting for postgres to be ready"
kubectl wait pods --selector app.kubernetes.io/name=postgresql \
--for condition=Ready --namespace postgres --timeout=60s
-
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
cat << EOF > $HOME/.ssh/config
Host localhost
StrictHostKeyChecking no
EOF
chmod 400 ~/.ssh/config
-
name: Test Directory
timeout-minutes: 10
env:
GITHUB_TOKEN: ${{ env.READ_WRITE_TOKEN }}
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