Skip to content

Commit

Permalink
surely
Browse files Browse the repository at this point in the history
  • Loading branch information
puzzler7 committed Apr 3, 2024
1 parent 540e7fe commit 1492440
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/repo_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ jobs:
fi
description: (test for setup-node)

- repo: prawn-test-staging-rw/node-packages-failure-test
ref: main
post-init: |
if [ "${FAILED_NODE_PACKAGE_INSTALL}" != "true" ]; then
echo "::error::Node package install didn't fail"
exit 1
fi
description: (test for continuing on node package install failure)

- repo: replayio/devtools
ref: 730a9f0ddaafefc2a1a293d6924ce3910cd156ac
description: (has trunk.yaml)
Expand Down
1 change: 1 addition & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ runs:
run: |
if [ ! -e .trunk/trunk.yaml ]; then
${TRUNK_PATH:-trunk} init
echo "INITIALIZED_TRUNK=true" >>$GITHUB_ENV
fi
- name: Detect setup strategy
Expand Down
21 changes: 21 additions & 0 deletions setup-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,27 @@ runs:
hashFiles(env.HASH_GLOB) }}

- name: Install ${{ env.PACKAGE_MANAGER }} packages
id: install_packages
if: env.PACKAGE_MANAGER && (env.NODE_VERSION_FILE || env.RUN_INSTALL_NODE_PACKAGES)
shell: bash
run: ${{ env.INSTALL_CMD }}
continue-on-error: true

- name: Check for package install
if: env.PACKAGE_MANAGER && (env.NODE_VERSION_FILE || env.RUN_INSTALL_NODE_PACKAGES)
shell: bash
run: |
if [ ${{ steps.install_packages.outcome }} == "success" ]; then
exit 0
fi
echo "FAILED_NODE_PACKAGE_INSTALL=true" >>$GITHUB_ENV
if [[ -z "${INITIALIZED_TRUNK}" ]]; then
echo "::error::Failed to install node packages."
echo "::error::Aborting because this repo has an existing trunk.yaml file."
exit 1
fi
echo "::warning::Failed to install node packages."
echo "::warning::Disabling linters that depend on node packages."
${TRUNK_PATH} check disable eslint
${TRUNK_PATH} check disable stylelint

0 comments on commit 1492440

Please sign in to comment.