Pin dependencies #73
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: Test setup | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
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 |