-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Testmo actions self-contained (#41)
* Fix README example * Use checks to reduce work * Make Testmo actions self-contained * Expand output * Make node check command quiet * Hide npm package funding requests
- Loading branch information
Showing
6 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
--- | ||
name: Install Testmo CLI tool | ||
description: Install Testmo including requirements (Node.js) | ||
description: Install Testmo including requirements (Node.js) if necessary | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: check-node | ||
shell: bash | ||
run: |- | ||
NEEDS_NODE=0 | ||
if ! command -v node &> /dev/null; then | ||
NEEDS_NODE=1 | ||
echo "install-testmo - latest Node.js LTS will be installed via actions/setup-node" | ||
else | ||
echo "install-testmo - Node.js $(node --version) already installed" | ||
fi | ||
echo "NEEDS_NODE=$NEEDS_NODE" >> "$GITHUB_OUTPUT" | ||
- uses: actions/setup-node@v4 | ||
if: ${{ steps.check-node.outputs.NEEDS_NODE == '1' }} | ||
with: | ||
node-version: lts/* | ||
|
||
- shell: bash | ||
run: |- | ||
npm install --global @testmo/testmo-cli | ||
if ! npx testmo --help &> /dev/null; then | ||
npm install --global --no-fund @testmo/testmo-cli | ||
echo "install-testmo - installed testmo-cli $(npx testmo --version)" | ||
else | ||
echo "install-testmo - testmo-cli $(npx testmo --version) already installed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters