Skip to content

Commit

Permalink
fix: install latest node correctly (#189)
Browse files Browse the repository at this point in the history
Fixes a typo in the backup path. Additionally, now always installs the
latest node if the first node fails, so that that code path gets tested.
  • Loading branch information
puzzler7 committed Sep 15, 2023
1 parent ec5ab67 commit 97ecd21
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/docker_repo_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,52 @@ jobs:
# terrascan scans dockerfile.js (a JS file for parsing dockerfiles) as a dockerfile itself
echo "src/languages/dockerfile.js" >> .gitignore
cp local-action/repo_tests/highlightjs.yaml .trunk/user.yaml
cache: true

- repo: pallets/flask
ref: 4bcd4be6b7d69521115ef695a379361732bcaea6
post-init: |
# prettier chokes on this malformed html file
echo "examples/celery/src/task_app/templates/index.html" >> .gitignore
cp local-action/repo_tests/flask.yaml .trunk/user.yaml
cache: true

- repo: postcss/postcss
ref: aa9e03ea4708909631eba70500c8c0cc0708bb4e
description: (uses pnpm)
post-init: |
${TRUNK_PATH} check enable eslint
cache: true

- repo: postcss/postcss
ref: aa9e03ea4708909631eba70500c8c0cc0708bb4e
description: (compat test for cli 1.0.0)
post-init: |
${TRUNK_PATH} check enable eslint
cache: true

- repo: prawn-test-staging-rw/setup-node-test
ref: main
post-init: |
if [ "${FAILED_NODE_INSTALL}" != "true" ]; then
echo "::error::Initial setup node didn't fail"
exit 1
fi
if [ "${INSTALL_LATEST_NODE}" != "true" ]; then
echo "::error::Initial setup node didn't fail"
exit 1
fi
description: (test for setup-node)
pre-init: |
while which node > /dev/null; do
rm $(which node)
done
cache: false

- repo: sass/sass
ref: 225e176115211387e014d97ae0076d94de3152a1
description: (uses npm)
cache: true

steps:
- name: Checkout ${{ matrix.repo }}
Expand All @@ -68,11 +91,15 @@ jobs:
with:
path: local-action

- name: Run pre-init
shell: bash
run: ${{ matrix.pre-init }}

- name: Run trunk-action in ${{ matrix.repo }}
id: trunk
uses: ./local-action/
with:
cache: true
cache: ${{ matrix.cache }}
check-mode: all
post-init: ${{ matrix.post-init }}
arguments: --output-file=/tmp/landing-state.json
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/repo_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
echo "::error::Initial setup node didn't fail"
exit 1
fi
description: (test for setup-node)

- repo: replayio/devtools
ref: 730a9f0ddaafefc2a1a293d6924ce3910cd156ac
Expand Down
2 changes: 1 addition & 1 deletion setup-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ runs:
if: env.PACKAGE_MANAGER && env.NODE_VERSION_FILE && env.INSTALL_LATEST_NODE == 'true'
uses: actions/setup-node@v3
with:
node-version-file: latest
node-version: latest

- name: Cache node_modules
if: inputs.cache-key && env.PACKAGE_MANAGER
Expand Down

0 comments on commit 97ecd21

Please sign in to comment.