Skip to content

Commit

Permalink
fix(ag-solo-xs): use noflake to help mitigate CI flakes
Browse files Browse the repository at this point in the history
Closes #471
  • Loading branch information
michaelfig committed Jan 28, 2020
1 parent c9cc4e8 commit 4ee9889
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/ag-solo-xs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,35 @@ jobs:
mv tape-xs-ag03 tape-xs
cd tape-xs
yarn install
- name: create /usr/local/bin/noflake
run: |
nf=/usr/local/bin/noflake
sudo tee "$nf" <<\EOF >/dev/null
#! /bin/sh
# noflake: rerun a command until it doesn't flake out
CMD=${1+"$@"}
FLAKE_STATUS=2
RETRIES=3
status=$FLAKE_STATUS
tries=0
while test $tries -le $RETRIES -a $status -eq $FLAKE_STATUS; do
tries=`expr $tries + 1`
echo 1>&2 "noflake: try number $tries of: $CMD"
$CMD
status=$?
echo 1>&2 "noflake: exit status $status"
done
exit $status
EOF
sudo chmod +x "$nf"
- name: test eventual-send on xs
run: |
export MODDABLE=$HOME/moddable
export PATH=$MODDABLE/build/bin/lin/release:$PATH
export TAPE=$HOME/tape-xs
cd packages/eventual-send
node -r esm $TAPE/bin/tape-xs-build.js $PWD test/test*.js
mcconfig -m -p x-cli-lin test-xs-manifest.json
noflake mcconfig -m -p x-cli-lin test-xs-manifest.json
$MODDABLE/build/bin/lin/release/eventual-send
- name: test marshal on xs
run: |
Expand All @@ -53,5 +74,5 @@ jobs:
export TAPE=$HOME/tape-xs
cd packages/marshal
node -r esm $TAPE/bin/tape-xs-build.js $PWD test/test*.js
mcconfig -m -p x-cli-lin test-xs-manifest.json
noflake mcconfig -m -p x-cli-lin test-xs-manifest.json
$MODDABLE/build/bin/lin/release/marshal

0 comments on commit 4ee9889

Please sign in to comment.