From 259ff005d10024208c1aa6a247f72e8da8e8c61b Mon Sep 17 00:00:00 2001 From: abhikdps Date: Mon, 2 Dec 2024 17:19:18 +0530 Subject: [PATCH] Add node.js setup support --- .github/workflows/tox.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index eda4d93..6ab3127 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -54,6 +54,11 @@ on: description: Command to run after test commands. required: false type: string + default_node: + default: "" + description: Path to the Node.js version file (e.g., `.tool-versions`) + required: false + type: string # keep permissions at top level because this is a composite workflow permissions: checks: read @@ -120,6 +125,12 @@ jobs: cache: ${{ hashFiles('requirements.txt', 'pyproject.toml') && 'pip' || '' }} python-version: ${{ matrix.python_version || '3.12' }} + - name: Set up Node.js + if: ${{ inputs.default_node != '' }} + uses: actions/setup-node@v3 + with: + node-version-file: ${{ inputs.default_node }} + - name: Run pre if: ${{ inputs.run_pre }} run: ${{ inputs.run_pre }}