Skip to content

Pin dependencies

Pin dependencies #76

Workflow file for this run

---
name: Test setup
on:
push:
branches:
- main
paths-ignore:
- COPYRIGHT.md
- .github/*.md
- .github/workflows/pre-commit.yml
- .gitignore
- img/**
- LICENSE
- .markdownlint.yaml
- .pre-commit-config.yaml
- pyproject.toml
- README.md
- renovate.json
- .secrets.baseline
pull_request:
branches:
- main
paths-ignore:
- COPYRIGHT.md
- .github/*.md
- .github/workflows/pre-commit.yml
- .gitignore
- img/**
- LICENSE
- .markdownlint.yaml
- .pre-commit-config.yaml
- pyproject.toml
- README.md
- renovate.json
- .secrets.baseline
jobs:
test-setup:
name: Run ./setup.sh
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install project dependencies
shell: bash
run: |
brew install cfssl curl helm ipcalc kubectl
brew install --cask multipass
hash -r
- name: Wait for multipass to be up
shell: bash
run: |
until multipass list; do
echo 'multipass is not running, will check again in 2 seconds'
sleep 2
done
- name: Confirm depdencies are available in PATH
shell: bash
run: |
multipass list
cfssl version
cfssljson --version
ipcalc --version
kubectl version --client
helm version
- name: Setup kubernetes
shell: bash
run: ./setup.sh
- name: Wait for kubernetes to be up
shell: bash
run: |
declare -a PODS=()
while IFS= read -r l; do
if [[ -n ${l} ]]; then
PODS+=("${l}")
fi
done < <(kubectl get pods -o json -A | jq -r '.items[] | .status.containerStatuses[]? | [.name] |join(":")')
for p in "${PODS[@]}"; do
until grep -q 'true' <(grep "${p}" <(kubectl get pods -o json -A | jq -r '.items[] | .status.containerStatuses[]? | [.name, .ready|tostring] |join(":")')); do
echo "Pod ${p} is not ready yet, will wait 2 seconds"
sleep 2
done
done
- name: Run tests
shell: bash
run: ./tests/tests.sh