diff --git a/.github/setup-node/action.yaml b/.github/setup-node/action.yaml new file mode 100644 index 000000000000..e30400d42de5 --- /dev/null +++ b/.github/setup-node/action.yaml @@ -0,0 +1,24 @@ +name: 'Setup Node.js' +description: 'Sets up Node.js and installs dependencies' +inputs: + node-version: + description: 'The Node.js version to use' + required: false + default: '20.16.0' + cache: + description: 'Whether to cache dependencies' + required: false + default: 'yarn' + cache-dependency-path: + description: 'The path to the dependency file to cache' + required: false + default: './client/yarn.lock' +runs: + using: "composite" + steps: + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: ${{ inputs.cache }} + cache-dependency-path: ${{ inputs.cache-dependency-path }} \ No newline at end of file diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index 8eb5a2dd564a..eecfae5a21f9 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -47,11 +47,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ../.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/build_client.yaml b/.github/workflows/build_client.yaml index c31032013902..a89672a6a539 100644 --- a/.github/workflows/build_client.yaml +++ b/.github/workflows/build_client.yaml @@ -14,11 +14,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - name: get client commit id: client-commit shell: bash diff --git a/.github/workflows/converter_tests.yaml b/.github/workflows/converter_tests.yaml index b953699e6048..cb1c5fe3b023 100644 --- a/.github/workflows/converter_tests.yaml +++ b/.github/workflows/converter_tests.yaml @@ -31,11 +31,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - name: Clone galaxyproject/galaxy-test-data uses: actions/checkout@v4 with: diff --git a/.github/workflows/cwl_conformance.yaml b/.github/workflows/cwl_conformance.yaml index 10fb215bf042..90ca4c6d27dd 100644 --- a/.github/workflows/cwl_conformance.yaml +++ b/.github/workflows/cwl_conformance.yaml @@ -40,11 +40,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/first_startup.yaml b/.github/workflows/first_startup.yaml index e35170d063a0..b738930f2f40 100644 --- a/.github/workflows/first_startup.yaml +++ b/.github/workflows/first_startup.yaml @@ -31,11 +31,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/framework_tools.yaml b/.github/workflows/framework_tools.yaml index a55dfa316488..67ba9c2f5179 100644 --- a/.github/workflows/framework_tools.yaml +++ b/.github/workflows/framework_tools.yaml @@ -43,11 +43,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/framework_workflows.yaml b/.github/workflows/framework_workflows.yaml index 93ab6c0bbf1a..ea2067eae771 100644 --- a/.github/workflows/framework_workflows.yaml +++ b/.github/workflows/framework_workflows.yaml @@ -43,11 +43,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 4a62c094e71d..5e064ae55b39 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -68,11 +68,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/integration_selenium.yaml b/.github/workflows/integration_selenium.yaml index 311fb16a96f0..d2e61acb33da 100644 --- a/.github/workflows/integration_selenium.yaml +++ b/.github/workflows/integration_selenium.yaml @@ -65,11 +65,7 @@ jobs: with: path: 'galaxy root/.venv' key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-integration-selenium - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - name: Restore client cache uses: actions/cache@v4 with: diff --git a/.github/workflows/jest.yaml b/.github/workflows/jest.yaml index 0d69a1498299..631c9b8abe91 100644 --- a/.github/workflows/jest.yaml +++ b/.github/workflows/jest.yaml @@ -14,17 +14,10 @@ concurrency: jobs: client-unit-test: runs-on: ubuntu-latest - strategy: - matrix: - node: [18] steps: - uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node}} - cache: 'yarn' - cache-dependency-path: 'client/yarn.lock' + uses: ./.github/setup-node/ - run: yarn install --frozen-lockfile working-directory: client - name: Stage client libs (Gulp) diff --git a/.github/workflows/js_lint.yaml b/.github/workflows/js_lint.yaml index ea821e1c105b..c3d3cb1efdd9 100644 --- a/.github/workflows/js_lint.yaml +++ b/.github/workflows/js_lint.yaml @@ -14,17 +14,9 @@ concurrency: jobs: client-unit-test: runs-on: ubuntu-latest - strategy: - matrix: - node: [18] steps: - uses: actions/checkout@v4 - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node}} - cache: 'yarn' - cache-dependency-path: 'client/yarn.lock' + - uses: ./.github/setup-node/ - run: yarn install --frozen-lockfile working-directory: client - name: Run ESLint diff --git a/.github/workflows/lint_openapi_schema.yml b/.github/workflows/lint_openapi_schema.yml index 2a94508ce6f2..8640354da11a 100644 --- a/.github/workflows/lint_openapi_schema.yml +++ b/.github/workflows/lint_openapi_schema.yml @@ -25,11 +25,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml index 22ffc4d7e5b6..aa78ca694222 100644 --- a/.github/workflows/osx_startup.yaml +++ b/.github/workflows/osx_startup.yaml @@ -29,11 +29,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - name: Cache pip dir uses: actions/cache@v4 with: diff --git a/.github/workflows/performance.yaml b/.github/workflows/performance.yaml index ab4063c51f7d..5754c0702ae2 100644 --- a/.github/workflows/performance.yaml +++ b/.github/workflows/performance.yaml @@ -42,11 +42,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/reports_startup.yaml b/.github/workflows/reports_startup.yaml index 137c1a5e1204..3479bb39a898 100644 --- a/.github/workflows/reports_startup.yaml +++ b/.github/workflows/reports_startup.yaml @@ -26,11 +26,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/selenium.yaml b/.github/workflows/selenium.yaml index 195eb02b3de0..12f539ae38e0 100644 --- a/.github/workflows/selenium.yaml +++ b/.github/workflows/selenium.yaml @@ -51,11 +51,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/test_galaxy_packages.yaml b/.github/workflows/test_galaxy_packages.yaml index 293e98e658bd..d495c73ffb7b 100644 --- a/.github/workflows/test_galaxy_packages.yaml +++ b/.github/workflows/test_galaxy_packages.yaml @@ -23,11 +23,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/toolshed.yaml b/.github/workflows/toolshed.yaml index fae33b4e1225..0c226217a8cd 100644 --- a/.github/workflows/toolshed.yaml +++ b/.github/workflows/toolshed.yaml @@ -37,11 +37,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/unit-postgres.yaml b/.github/workflows/unit-postgres.yaml index 92ee7795854c..741b9ce01d3c 100644 --- a/.github/workflows/unit-postgres.yaml +++ b/.github/workflows/unit-postgres.yaml @@ -36,11 +36,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index 80f54e87a704..45f35924ff2c 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -25,11 +25,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'galaxy root' - - uses: actions/setup-node@v4 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' + - uses: ./.github/setup-node/ - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/client/.node_version b/client/.node_version index b460d6f2dea9..8ce7030825b5 100644 --- a/client/.node_version +++ b/client/.node_version @@ -1 +1 @@ -18.12.1 +20.16.0