From 3a2e936401993f06b92159438d4fdd520333a536 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 4 May 2023 17:34:48 +0200 Subject: [PATCH] Install node from setup-node action in more tests Should help with nodeenv failing in CI tests, e.g. ``` Installing node into /home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage with nodeenv. * Install prebuilt node (18.12.1) .Incomplete read while readingfrom https://nodejs.org/download/release/v18.12.1/node-v18.12.1-linux-x64.tar.gz . Traceback (most recent call last): File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/bin/nodeenv", line 10, in sys.exit(main()) File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.7/site-packages/nodeenv.py", line 1104, in main create_environment(env_dir, args) File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.7/site-packages/nodeenv.py", line 980, in create_environment install_node(env_dir, src_dir, args) File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.7/site-packages/nodeenv.py", line 739, in install_node install_node_wrapped(env_dir, src_dir, args) File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.7/site-packages/nodeenv.py", line 762, in install_node_wrapped download_node_src(node_url, src_dir, args) File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.7/site-packages/nodeenv.py", line 602, in download_node_src with ctx as archive: File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.7/site-packages/nodeenv.py", line 573, in tarfile_open tf = tarfile.open(*args, **kwargs) File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/tarfile.py", line 1573, in open saved_pos = fileobj.tell() AttributeError: 'bytes' object has no attribute 'tell' ``` from https://github.com/galaxyproject/galaxy/actions/runs/4883207488/jobs/8714237674?pr=16036 --- .github/workflows/api.yaml | 5 +++++ .github/workflows/converter_tests.yaml | 5 +++++ .github/workflows/cwl_conformance.yaml | 5 +++++ .github/workflows/first_startup.yaml | 10 +++++----- .github/workflows/framework.yaml | 5 +++++ .github/workflows/integration.yaml | 5 +++++ .github/workflows/osx_startup.yaml | 5 +++++ .github/workflows/performance.yaml | 5 +++++ .github/workflows/reports_startup.yaml | 10 +++++----- .github/workflows/selenium.yaml | 10 +++++----- .github/workflows/unit-postgres.yaml | 5 +++++ .github/workflows/unit.yaml | 5 +++++ 12 files changed, 60 insertions(+), 15 deletions(-) diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index fa27da664207..90038e328865 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -47,6 +47,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/converter_tests.yaml b/.github/workflows/converter_tests.yaml index f9e6649f86e7..d4833d376ab7 100644 --- a/.github/workflows/converter_tests.yaml +++ b/.github/workflows/converter_tests.yaml @@ -31,6 +31,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Clone galaxyproject/galaxy-test-data uses: actions/checkout@v3 with: diff --git a/.github/workflows/cwl_conformance.yaml b/.github/workflows/cwl_conformance.yaml index 46b750143c46..716a8ca2bbbd 100644 --- a/.github/workflows/cwl_conformance.yaml +++ b/.github/workflows/cwl_conformance.yaml @@ -38,6 +38,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/first_startup.yaml b/.github/workflows/first_startup.yaml index 520888fbd3ae..34093cae9605 100644 --- a/.github/workflows/first_startup.yaml +++ b/.github/workflows/first_startup.yaml @@ -29,6 +29,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Set up Python uses: actions/setup-python@v4 with: @@ -48,11 +53,6 @@ jobs: with: path: .tox key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-first-startup - - uses: actions/setup-node@v3 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Install tox run: pip install tox - name: run tests diff --git a/.github/workflows/framework.yaml b/.github/workflows/framework.yaml index 679857a0b52c..5de51cca7cad 100644 --- a/.github/workflows/framework.yaml +++ b/.github/workflows/framework.yaml @@ -43,6 +43,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index eaec4175caed..8ad4ba1424c4 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -71,6 +71,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml index 4e64a3eb19ba..a67494e70444 100644 --- a/.github/workflows/osx_startup.yaml +++ b/.github/workflows/osx_startup.yaml @@ -22,6 +22,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Get full Python version id: full-python-version shell: bash diff --git a/.github/workflows/performance.yaml b/.github/workflows/performance.yaml index 8a8305760a45..4eda60399585 100644 --- a/.github/workflows/performance.yaml +++ b/.github/workflows/performance.yaml @@ -42,6 +42,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/reports_startup.yaml b/.github/workflows/reports_startup.yaml index bef55b8d3572..805686e3d388 100644 --- a/.github/workflows/reports_startup.yaml +++ b/.github/workflows/reports_startup.yaml @@ -26,6 +26,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Set up Python uses: actions/setup-python@v4 with: @@ -45,11 +50,6 @@ jobs: with: path: 'galaxy root/.venv' key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-reports-startup - - uses: actions/setup-node@v3 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Install tox run: pip install tox - name: Run tests diff --git a/.github/workflows/selenium.yaml b/.github/workflows/selenium.yaml index d3128b02f7ce..12dba9f75782 100644 --- a/.github/workflows/selenium.yaml +++ b/.github/workflows/selenium.yaml @@ -46,6 +46,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -63,11 +68,6 @@ jobs: with: path: 'galaxy root/.venv' key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-selenium - - uses: actions/setup-node@v3 - with: - node-version: '18.12.1' - cache: 'yarn' - cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: nanasess/setup-chromedriver@v1 - name: Run tests run: ./run_tests.sh --coverage -selenium lib/galaxy_test/selenium -- --num-shards=3 --shard-id=${{ matrix.chunk }} diff --git a/.github/workflows/unit-postgres.yaml b/.github/workflows/unit-postgres.yaml index 871f1a833a76..ea8fe8b9ad05 100644 --- a/.github/workflows/unit-postgres.yaml +++ b/.github/workflows/unit-postgres.yaml @@ -36,6 +36,11 @@ jobs: - uses: actions/checkout@v3 with: path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index 2d8ae1660aca..8ade16541a1f 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -28,6 +28,11 @@ jobs: - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' - name: Get full Python version id: full-python-version shell: bash