Skip to content

Commit

Permalink
chore: prevent publish job from partial publishing (#4423)
Browse files Browse the repository at this point in the history
Typically when a bad publish happens, it fails on the first one. Because the publish is in a loop, it does not exit the script properly on error (set -e doesn't matter cause bash is crazy).

Also, too many spec tests are happening at once.

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
MarkMcCulloh authored Oct 5, 2023
1 parent 713f29a commit 3b32dc0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,10 @@ jobs:
PACKAGE_VERSION: ${{ needs.build.outputs.version }}
with:
max_attempts: 7
retry_on: error
timeout_minutes: 5
command: |
set -o pipefail
cd dist
PACKAGES=("@winglang/sdk" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang")
for PACKAGE in "${PACKAGES[@]}"; do
Expand All @@ -402,6 +403,11 @@ jobs:
TARBALL=$(echo "$PACKAGE-$PACKAGE_VERSION.tgz" | sed 's/@//g' | sed 's/\//-/g')
npm publish "$TARBALL" --access public --verbose
if [ $? -ne 0 ]; then
echo "Publishing $PACKAGE failed, exiting"
exit 1
fi
done
- name: Publish Extension to Visual Studio Marketplace
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tf-aws-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 10
matrix: ${{ fromJson(needs.setup.outputs.tests) }}
name: ${{ matrix.test.name }}
steps:
Expand Down

0 comments on commit 3b32dc0

Please sign in to comment.