diff --git a/.github/workflows/converter_tests.yaml b/.github/workflows/converter_tests.yaml index df26e3cb32c9..dc3179f8b428 100644 --- a/.github/workflows/converter_tests.yaml +++ b/.github/workflows/converter_tests.yaml @@ -24,61 +24,61 @@ jobs: matrix: python-version: ['3.7'] steps: - - if: github.event_name == 'schedule' - run: | - echo "GALAXY_CONFIG_OVERRIDE_METADATA_STRATEGY=extended" >> $GITHUB_ENV - echo "GALAXY_CONFIG_OVERRIDE_OUTPUTS_TO_WORKING_DIRECTORY=true" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - path: 'galaxy root' - - name: Clone galaxyproject/galaxy-test-data - uses: actions/checkout@v3 - with: - repository: galaxyproject/galaxy-test-data - path: galaxy-test-data - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Cache venv dir - uses: actions/cache@v3 - id: pip-cache - with: - path: ~/.cache/pip - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - - name: Move test data - run: rsync -av --remove-source-files --exclude .git galaxy-test-data/ 'galaxy root/test-data/' - - name: Install planemo - run: pip install planemo - - name: Determine converters to check - run: | - ls 'galaxy root'/lib/galaxy/datatypes/converters/*xml | grep -v -f 'galaxy root'/lib/galaxy/datatypes/converters/.tt_skip > tool_list.txt - echo "Skipping checks for the following converters:" - ls 'galaxy root'/lib/galaxy/datatypes/converters/*xml | grep -f 'galaxy root'/lib/galaxy/datatypes/converters/.tt_skip - echo "Checking only the following converters:" - cat tool_list.txt - - name: Lint converters - run: | - mapfile -t TOOL_ARRAY < tool_list.txt - for CONVERTER in "${TOOL_ARRAY[@]}"; do - planemo lint --skip citations,stdio,help --report_level warn "$CONVERTER" - done - - name: Run tests - run: | - mkdir -p json_output - EXIT_CODE=0 - mapfile -t TOOL_ARRAY < tool_list.txt - for CONVERTER in "${TOOL_ARRAY[@]}"; do - json=$(mktemp -u -p json_output --suff .json) - planemo test --test_output_json "$json" --galaxy_python_version ${{ matrix.python-version }} --galaxy_root 'galaxy root' "$CONVERTER" || EXIT_CODE=$? - done - planemo merge_test_reports json_output/*.json tool_test_output.json - planemo test_reports tool_test_output.json --test_output tool_test_output.html - if [ "$EXIT_CODE" -ne 0 ]; then - echo "Unsuccessful tests found, inspect the 'Converter test results' artifact for details." - exit $EXIT_CODE - fi - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: Converter test results (${{ matrix.python-version }}) - path: tool_test_output.html + - if: github.event_name == 'schedule' + run: | + echo "GALAXY_CONFIG_OVERRIDE_METADATA_STRATEGY=extended" >> $GITHUB_ENV + echo "GALAXY_CONFIG_OVERRIDE_OUTPUTS_TO_WORKING_DIRECTORY=true" >> $GITHUB_ENV + - uses: actions/checkout@v3 + with: + path: 'galaxy root' + - name: Clone galaxyproject/galaxy-test-data + uses: actions/checkout@v3 + with: + repository: galaxyproject/galaxy-test-data + path: galaxy-test-data + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Cache venv dir + uses: actions/cache@v3 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Move test data + run: rsync -av --remove-source-files --exclude .git galaxy-test-data/ 'galaxy root/test-data/' + - name: Install planemo + run: pip install planemo + - name: Determine converters to check + run: | + ls 'galaxy root'/lib/galaxy/datatypes/converters/*xml | grep -v -f 'galaxy root'/lib/galaxy/datatypes/converters/.tt_skip > tool_list.txt + echo "Skipping checks for the following converters:" + ls 'galaxy root'/lib/galaxy/datatypes/converters/*xml | grep -f 'galaxy root'/lib/galaxy/datatypes/converters/.tt_skip + echo "Checking only the following converters:" + cat tool_list.txt + - name: Lint converters + run: | + mapfile -t TOOL_ARRAY < tool_list.txt + for CONVERTER in "${TOOL_ARRAY[@]}"; do + planemo lint --skip citations,stdio,help --report_level warn "$CONVERTER" + done + - name: Run tests + run: | + mkdir -p json_output + EXIT_CODE=0 + mapfile -t TOOL_ARRAY < tool_list.txt + for CONVERTER in "${TOOL_ARRAY[@]}"; do + json=$(mktemp -u -p json_output --suff .json) + planemo test --test_output_json "$json" --galaxy_python_version ${{ matrix.python-version }} --galaxy_root 'galaxy root' "$CONVERTER" || EXIT_CODE=$? + done + planemo merge_test_reports json_output/*.json tool_test_output.json + planemo test_reports tool_test_output.json --test_output tool_test_output.html + if [ "$EXIT_CODE" -ne 0 ]; then + echo "Unsuccessful tests found, inspect the 'Converter test results' artifact for details." + exit $EXIT_CODE + fi + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: Converter test results (${{ matrix.python-version }}) + path: tool_test_output.html diff --git a/.github/workflows/db_indexes.yaml b/.github/workflows/db_indexes.yaml index 42d70717eb2d..7c7a11a161e8 100644 --- a/.github/workflows/db_indexes.yaml +++ b/.github/workflows/db_indexes.yaml @@ -38,34 +38,34 @@ jobs: ports: - 5432:5432 steps: - - uses: actions/checkout@v3 - with: - path: 'galaxy root' - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Get full Python version - id: full-python-version - shell: bash - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Cache pip dir - uses: actions/cache@v3 - id: pip-cache - with: - path: ~/.cache/pip - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - - name: Cache tox env - uses: actions/cache@v3 - with: - path: .tox - key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-check-indexes - - name: Install tox - run: pip install tox - - name: Check indexes on postgresql - if: matrix.db == 'postgresql' - env: - GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION: 'postgresql://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8' - run: tox -e check_indexes - - name: Check indexes on sqlite - if: matrix.db == 'sqlite' - run: tox -e check_indexes + - uses: actions/checkout@v3 + with: + path: 'galaxy root' + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + - name: Cache pip dir + uses: actions/cache@v3 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Cache tox env + uses: actions/cache@v3 + with: + path: .tox + key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-check-indexes + - name: Install tox + run: pip install tox + - name: Check indexes on postgresql + if: matrix.db == 'postgresql' + env: + GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION: 'postgresql://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8' + run: tox -e check_indexes + - name: Check indexes on sqlite + if: matrix.db == 'sqlite' + run: tox -e check_indexes diff --git a/.github/workflows/first_startup.yaml b/.github/workflows/first_startup.yaml index 3ee628e65e11..172635b95d8e 100644 --- a/.github/workflows/first_startup.yaml +++ b/.github/workflows/first_startup.yaml @@ -26,33 +26,33 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v3 - with: - path: 'galaxy root' - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Get full Python version - id: full-python-version - shell: bash - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Cache pip dir - uses: actions/cache@v3 - id: pip-cache - with: - path: ~/.cache/pip - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - - name: Cache tox env - uses: actions/cache@v3 - with: - path: .tox - key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-first-startup - - uses: mvdbeek/gha-yarn-cache@master - with: - yarn-lock-file: 'galaxy root/client/yarn.lock' - - name: Install tox - run: pip install tox - - name: run tests - run: tox -e first_startup - working-directory: 'galaxy root' + - uses: actions/checkout@v3 + with: + path: 'galaxy root' + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + - name: Cache pip dir + uses: actions/cache@v3 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Cache tox env + uses: actions/cache@v3 + with: + path: .tox + key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-first-startup + - uses: mvdbeek/gha-yarn-cache@master + with: + yarn-lock-file: 'galaxy root/client/yarn.lock' + - name: Install tox + run: pip install tox + - name: run tests + run: tox -e first_startup + working-directory: 'galaxy root' diff --git a/.github/workflows/jest.yaml b/.github/workflows/jest.yaml index 288a043c9a63..01bea00d01f8 100644 --- a/.github/workflows/jest.yaml +++ b/.github/workflows/jest.yaml @@ -18,20 +18,20 @@ jobs: matrix: node: [16] steps: - - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node}} - cache: 'yarn' - cache-dependency-path: 'client/yarn.lock' - - run: yarn install --frozen-lockfile - working-directory: client - - name: Stage client libs (Gulp) - run: yarn run gulp client - working-directory: client - - name: Run Unit Tests - run: yarn run qunit - working-directory: client - - run: yarn jest - working-directory: client + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node}} + cache: 'yarn' + cache-dependency-path: 'client/yarn.lock' + - run: yarn install --frozen-lockfile + working-directory: client + - name: Stage client libs (Gulp) + run: yarn run gulp client + working-directory: client + - name: Run Unit Tests + run: yarn run qunit + working-directory: client + - run: yarn jest + working-directory: client diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml index e566891372e1..7231567b2661 100644 --- a/.github/workflows/osx_startup.yaml +++ b/.github/workflows/osx_startup.yaml @@ -19,31 +19,31 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v3 - with: - path: 'galaxy root' - - name: Get full Python version - id: full-python-version - shell: bash - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Cache pip dir - uses: actions/cache@v3 - id: pip-cache - with: - path: ~/Library/Caches/pip - # scripts/common_startup.sh creates a conda env for Galaxy containing Python 3.7 - key: pip-cache-3.7-${{ hashFiles('galaxy root/requirements.txt') }} - - name: Cache tox env - uses: actions/cache@v3 - with: - path: .tox - key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-osx - - name: Install and activate miniconda # use this job to test using Python from a conda environment - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: '' - - name: Install tox - run: pip install tox - - name: run tests - run: tox -e first_startup - working-directory: 'galaxy root' + - uses: actions/checkout@v3 + with: + path: 'galaxy root' + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + - name: Cache pip dir + uses: actions/cache@v3 + id: pip-cache + with: + path: ~/Library/Caches/pip + # scripts/common_startup.sh creates a conda env for Galaxy containing Python 3.7 + key: pip-cache-3.7-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Cache tox env + uses: actions/cache@v3 + with: + path: .tox + key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-osx + - name: Install and activate miniconda # use this job to test using Python from a conda environment + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: '' + - name: Install tox + run: pip install tox + - name: run tests + run: tox -e first_startup + working-directory: 'galaxy root' diff --git a/.github/workflows/reports_startup.yaml b/.github/workflows/reports_startup.yaml index 8f610ef09317..7e5f2c8d18ba 100644 --- a/.github/workflows/reports_startup.yaml +++ b/.github/workflows/reports_startup.yaml @@ -23,33 +23,33 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v3 - with: - path: 'galaxy root' - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Get full Python version - id: full-python-version - shell: bash - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Cache pip dir - uses: actions/cache@v3 - id: pip-cache - with: - path: ~/.cache/pip - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - - name: Cache galaxy venv - uses: actions/cache@v3 - with: - path: 'galaxy root/.venv' - key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-reports-startup - - uses: mvdbeek/gha-yarn-cache@master - with: - yarn-lock-file: 'galaxy root/client/yarn.lock' - - name: Install tox - run: pip install tox - - name: Run tests - run: tox -e reports_startup - working-directory: 'galaxy root' + - uses: actions/checkout@v3 + with: + path: 'galaxy root' + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + - name: Cache pip dir + uses: actions/cache@v3 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Cache galaxy venv + uses: actions/cache@v3 + with: + path: 'galaxy root/.venv' + key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-reports-startup + - uses: mvdbeek/gha-yarn-cache@master + with: + yarn-lock-file: 'galaxy root/client/yarn.lock' + - name: Install tox + run: pip install tox + - name: Run tests + run: tox -e reports_startup + working-directory: 'galaxy root'