Stabilize charts #212
Workflow file for this run
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: Basic Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
defaults: | |
run: | |
shell: bash -el {0} | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: pre-commit/[email protected] | |
- uses: pre-commit-ci/[email protected] | |
if: always() | |
run-demo: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start demo | |
run: | | |
./run_demo.sh --exit-when-done | |
- name: Debugging information | |
run: | | |
export KUBECONFIG=$PWD/.demo/kube.conf | |
.demo/kubectl get pods | |
for pod_name in $(.demo/kubectl get pods -o json | jq -r '.items[] | .metadata.name' | grep -vE '(dex|minio|mysql|rabbitmq|opensearch)'); do | |
echo "${pod_name}" | |
.demo/kubectl describe pod/"${pod_name}" || true | |
for container_name in $(.demo/kubectl get pods $pod_name -o jsonpath='{.spec.initContainers[*].name} {.spec.containers[*].name}'); do | |
echo $pod_name $container_name | |
.demo/kubectl logs "${pod_name}" -c "${container_name}" || true | |
done | |
done | |
- name: Check for success | |
run: | | |
if [ ! -f ".demo/.success" ]; then | |
echo "Demo failed" | |
cat ".demo/.failed" | |
exit 1 | |
fi | |
# Same as run-demo except mount the sources inside the container | |
run-demo-mount-sources: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone source | |
run: | | |
git clone https://github.com/DIRACGrid/diracx.git /tmp/diracx | |
git clone https://github.com/DIRACGrid/DIRAC.git /tmp/DIRAC | |
- name: Start demo | |
run: | | |
./run_demo.sh --exit-when-done /tmp/diracx /tmp/DIRAC | |
- name: Debugging information | |
run: | | |
export KUBECONFIG=$PWD/.demo/kube.conf | |
.demo/kubectl get pods | |
for pod_name in $(.demo/kubectl get pods -o json | jq -r '.items[] | .metadata.name' | grep -vE '(dex|minio|mysql|rabbitmq|opensearch)'); do | |
echo "${pod_name}" | |
.demo/kubectl describe pod/"${pod_name}" || true | |
for container_name in $(.demo/kubectl get pods $pod_name -o jsonpath='{.spec.initContainers[*].name} {.spec.containers[*].name}'); do | |
echo $pod_name $container_name | |
.demo/kubectl logs "${pod_name}" -c "${container_name}" || true | |
done | |
done | |
- name: Check for success | |
run: | | |
if [ ! -f ".demo/.success" ]; then | |
echo "Demo failed" | |
cat ".demo/.failed" | |
exit 1 | |
fi |