Skip to content

Commit

Permalink
Improve task setup phase
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Nov 9, 2023
1 parent 7798082 commit 109e54f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
45 changes: 23 additions & 22 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
ALS
Anson
Containerfile
Dockal
FQCN
FQCNs
Florian
Launay
Maciążek
OSTYPE
Ondrej
PYTHONBREAKPOINT
PYTHONHOME
Pinkney
Pyenv
Sbarnea
Schwalm
Sorin
TLDR
Testenvs
Tomasz
Webviews
aarch
ajinkyau
akira
alefragnani
alphanums
ALS
Anson
autofix
autoupdate
backticks
Expand All @@ -18,18 +38,17 @@ codespell
codicon
codicons
commitlint
Containerfile
contentmatch
contentmatches
copyfiles
cygwin
cython
dbaeumer
dedupe
depcheck
deps
devel
direnv
Dockal
dpkg
eamodio
endgroup
Expand All @@ -39,9 +58,6 @@ eqeqeq
esbenp
extest
fgierlinger
Florian
FQCN
FQCNs
fredericgiquel
ganeshrn
githubcli
Expand All @@ -55,14 +71,12 @@ jeinwag
johndoe
keyfile
keyrings
Launay
lextudio
libyaml
lightspeed
liveserver
loglevel
lxml
Maciążek
markdownlint
maxlength
mochawesome
Expand All @@ -73,12 +87,9 @@ myuser
noheading
npmrc
nsible
Ondrej
OSTYPE
overridable
ovsx
parseable
Pinkney
piptools
pipx
precheck
Expand All @@ -87,35 +98,26 @@ preinstall
priyamsahoo
projectuser
prsahoo
Pyenv
pyparsing
PYTHONBREAKPOINT
PYTHONHOME
reindent
reindented
relogin
ritwickdey
rulebooks
Sbarnea
Schwalm
showformat
simplejson
Sorin
sourcemaps
ssbarnea
ssydoren
stopendy
suboptions
sysninja
taskfile
Testenvs
testenv
testhost
testorg
timonwong
TLDR
tomaciazek
Tomasz
towerhost
tsbuildinfo
tsdoc
Expand All @@ -130,7 +132,6 @@ vscoss
vsix
vyos
watsonx
Webviews
webknjaz
webpacked
whitespaces
Expand Down
1 change: 1 addition & 0 deletions .config/requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cython>=3.0.5; python_version >= "3.12"
ansible-core>=2.13.0
ansible-lint>=6.8.7
mypy # used by vscode
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ CHANGELOG.html
!.yarn/versions
.DS_Store
.direnv
.tool-versions
10 changes: 8 additions & 2 deletions tools/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ log() {
echo >&2 -e "${prefix}${2}${NC}"
}

is_podman_running() {
podman machine ls --format '{{.Name}} {{.Running}}' --noheading | grep podman-machine-default | grep true >/dev/null
}

if [ ! -d "$HOME/.local/bin" ] ; then
log warning "Creating missing ~/.local/bin"
mkdir -p "$HOME/.local/bin"
Expand Down Expand Up @@ -330,7 +334,7 @@ if [[ "${OSTYPE:-}" == darwin* && "${SKIP_PODMAN:-}" != '1' ]]; then
}
podman machine ls --noheading
log notice "Checking status of podman machine ($MACHTYPE)..."
podman machine ls --format '{{.Name}} {{.Running}}' --noheading | grep podman-machine-default | grep true || {
is_podman_running || {
log warning "Podman machine not running, trying to start it..."
# do not use full path as it varies based on architecture
# https://github.com/containers/podman/issues/10824#issuecomment-1162392833
Expand All @@ -340,10 +344,12 @@ if [[ "${OSTYPE:-}" == darwin* && "${SKIP_PODMAN:-}" != '1' ]]; then
else
qemu-system-aarch64 -machine q35,accel=hvf:tcg -cpu host -display none INVALID_OPTION || true
fi
podman machine start
# Waiting for machine to become available
n=0
until [ "$n" -ge 5 ]; do
log warning "Trying to start podman machine again ($n)..."
time podman machine start && break # substitute your command here
is_podman_running && break
n=$((n+1))
sleep 15
done
Expand Down

0 comments on commit 109e54f

Please sign in to comment.