Skip to content
CI/CD Inventory

galaxyproject/iwc (opens in new tab)

11 workflows

Weekly global Workflow Linting and Tests

.github/workflows/ci.yaml (opens in new tab)
Weekly global Workflow Linting and Tests status

Triggers

schedule repository_dispatch

Jobs

Jobs for Weekly global Workflow Linting and Tests
Job Runs on Steps Actions used
Setup cache and determine changed repositories ubuntu-latest 10
peter-evans/create-or-update-comment@v4 actions/setup-python@v5 actions/cache@v4 actions/checkout@v4 galaxyproject/planemo-ci-action@v1
Lint workflows ubuntu-latest 5
actions/checkout@v4 actions/setup-python@v5 actions/cache@v4 galaxyproject/planemo-ci-action@v1
Test workflows ubuntu-latest 5
actions/checkout@v4 actions/setup-python@v5 actions/cache@v4 galaxyproject/planemo-ci-action@v1 actions/upload-artifact@v4
Combine chunked test results ubuntu-latest 8
actions/download-artifact@v4 actions/setup-python@v5 actions/cache@v4 galaxyproject/planemo-ci-action@v1 actions/upload-artifact@v4 peter-evans/create-or-update-comment@v4 galaxyproject/planemo-ci-action@v1
Raw YAML
name: Weekly global Workflow Linting and Tests
on:
  schedule:
    # Run at midnight every monday
    - cron: '0 0 * * 1'
  repository_dispatch:
    types: [run-all-workflow-tests-command]
env:
  GALAXY_FORK: galaxyproject
  GALAXY_BRANCH: release_25.1
  MAX_CHUNKS: 40
jobs:
  setup:
    name: Setup cache and determine changed repositories
    if: github.repository_owner == 'galaxyproject'
    runs-on: ubuntu-latest
    outputs:
      galaxy-head-sha: ${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }}
      fork: ${{ steps.get-fork-branch.outputs.fork }}
      branch: ${{ steps.get-fork-branch.outputs.branch }}
      repository-list: ${{ steps.discover.outputs.repository-list }}
      chunk-count: ${{ steps.discover.outputs.chunk-count }}
      chunk-list: ${{ steps.discover.outputs.chunk-list }}
    strategy:
      matrix:
        python-version: ['3.11']
    steps:
    - name: Add reaction
      if: ${{ github.event.client_payload.slash_command.command == 'run-all-workflow-tests' }}
      uses: peter-evans/create-or-update-comment@v4
      with:
        token: ${{ secrets.PAT }}
        repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
        comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
        reaction-type: hooray
    - name: Set galaxy fork and branch
      id: get-fork-branch
      run: |
        TMP="${{ github.event.client_payload.slash_command.args.named.fork }}"
        echo "fork=${TMP:-$GALAXY_FORK}" >> $GITHUB_OUTPUT
        TMP="${{ github.event.client_payload.slash_command.args.named.branch }}"
        echo "branch=${TMP:-$GALAXY_BRANCH}" >> $GITHUB_OUTPUT
    - name: Determine latest commit in the Galaxy repo
      id: get-galaxy-sha
      run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ steps.get-fork-branch.outputs.fork }}/galaxy refs/heads/${{ steps.get-fork-branch.outputs.branch }} | cut -f1)" >> $GITHUB_OUTPUT
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }}
    # Install the `wheel` package so that when installing other packages which
    # are not available as wheels, pip will build a wheel for them, which can be cached.
    - name: Install wheel
      run: pip install wheel
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
      uses: galaxyproject/planemo-ci-action@v1
      id: discover
      with:
        workflows: true
        create-cache: ${{ steps.cache-pip.outputs.cache-hit != 'true' || steps.cache-planemo.outputs.cache-hit != 'true' }}
        galaxy-fork: ${{ steps.get-fork-branch.outputs.fork }}
        galaxy-branch: ${{ steps.get-fork-branch.outputs.branch }}
        max-chunks: ${{ env.MAX_CHUNKS }}
        python-version: ${{ matrix.python-version }}
    - name: Show repository list
      run: echo '${{ steps.discover.outputs.repository-list }}'
    - name: Show chunks
      run: |
        echo 'Using ${{ steps.discover.outputs.chunk-count }} chunks (${{ steps.discover.outputs.chunk-list }})'

  # Planemo lint the workflows
  lint:
    name: Lint workflows
    needs: setup
    if: needs.setup.outputs.repository-list != ''
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.11']
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
    - name: Install wheel
      run: pip install wheel
    - name: Planemo lint workflows
      uses: galaxyproject/planemo-ci-action@v1
      with:
        mode: lint
        workflows: true
        repository-list: "${{ needs.setup.outputs.repository-list }}"
        additional-planemo-options: --iwc

  test:
    name: Test workflows
    # This job runs on Linux
    runs-on: ubuntu-latest
    needs: setup
    if: ${{ needs.setup.outputs.repository-list != '' }}
    strategy:
      fail-fast: false
      matrix:
        chunk: ${{ fromJson(needs.setup.outputs.chunk-list) }}
        python-version: ['3.11']
    services:
      postgres:
        image: postgres:11
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: postgres
        ports:
          - 5432:5432
    steps:
    # checkout the repository
    # and use it as the current working directory
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
    - name: Planemo test workflows
      uses: galaxyproject/planemo-ci-action@v1
      id: test-workflows
      with:
        mode: test
        workflows: true
        setup-cvmfs: true
        repository-list: ${{ needs.setup.outputs.repository-list }}
        galaxy-fork: ${{ needs.setup.outputs.fork }}
        galaxy-branch: ${{ needs.setup.outputs.branch }}
        chunk: ${{ matrix.chunk }}
        chunk-count: ${{ needs.setup.outputs.chunk-count }}
    - uses: actions/upload-artifact@v4
      with:
        name: 'Workflow test output ${{ matrix.chunk }}'
        path: upload

  # - combine the results of the test chunks (which will never fail due
  #   to `|| true`) and create a global test report as json and html which
  #   is provided as artifact
  # - check if any test actually failed (by lookup in the combined json)
  #   and fail this step if this is the case
  combine_outputs:
    name: Combine chunked test results
    needs: [setup, test]
    strategy:
      matrix:
        python-version: ['3.11']
    # This job runs on Linux
    runs-on: ubuntu-latest
    steps:
    - uses: actions/download-artifact@v4
      with:
        path: artifacts
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
    - name: Combine outputs
      uses: galaxyproject/planemo-ci-action@v1
      id: combine
      with:
        mode: combine
        html-report: true
    - uses: actions/upload-artifact@v4
      with:
        name: 'All workflow test results'
        path: upload
    - name: Create URL to the run output
      if: ${{ github.event.client_payload.slash_command.command == 'run-all-workflow-tests' }}
      id: vars
      run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT

    - name: Create comment
      if: ${{ github.event.client_payload.slash_command.command == 'run-all-workflow-tests' }}
      uses: peter-evans/create-or-update-comment@v4
      with:
        token: ${{ secrets.PAT }}
        repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
        issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
        body: |
          Summary:

          ${{ steps.combine.outputs.statistics }}

          [Find all workflow test results here][1]

          [1]: ${{ steps.vars.outputs.run-url }}
    - name: Check outputs
      uses: galaxyproject/planemo-ci-action@v1
      id: check
      with:
        mode: check

Last fetched:

Triggers

workflow_run

Jobs

Jobs for Comment on the pull request
Job Runs on Steps Actions used
download_and_comment ubuntu-latest 3
actions/github-script@v7 actions/github-script@v7
Raw YAML
name: Comment on the pull request

# read-write repo token
# access to secrets
on:
  workflow_run:
    workflows: ["Galaxy Workflow Tests for push and PR"]
    types:
      - completed

jobs:
  download_and_comment:
    runs-on: ubuntu-latest
    if: >
      github.event.workflow_run.event == 'pull_request' &&
      github.event.workflow_run.conclusion == 'failure'
    steps:
      - name: 'Download artifact'
        uses: actions/github-script@v7
        with:
          script: |
            var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
               owner: context.repo.owner,
               repo: context.repo.repo,
               run_id: ${{github.event.workflow_run.id }},
            });
            var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
              return artifact.name == 'All tool test results'
            })[0];
            var download = await github.rest.actions.downloadArtifact({
               owner: context.repo.owner,
               repo: context.repo.repo,
               artifact_id: matchArtifact.id,
               archive_format: 'zip',
            });
            var fs = require('fs');
            fs.writeFileSync('${{github.workspace}}/upload.zip', Buffer.from(download.data));
      - run: unzip upload.zip
      - name: 'Comment on PR'
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            var fs = require('fs');
            var issue_number = Number(fs.readFileSync('./NR'));
            await github.rest.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: issue_number,
              body: fs.readFileSync('./tool_test_output.md', 'utf-8')
            });

Last fetched:

enable CI workflows for iwc-workflows repositories

.github/workflows/enable_ci_workflows.yml (opens in new tab)
enable CI workflows for iwc-workflows repositories status

Triggers

schedule workflow_dispatch

Jobs

Jobs for enable CI workflows for iwc-workflows repositories
Job Runs on Steps Actions used
Enable CI workflows ubuntu-latest 2
actions/checkout@v4
Raw YAML
name: enable CI workflows for iwc-workflows repositories
on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:
jobs:
  enable:
    name: Enable CI workflows
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - name: run Python script
      env:
        GITHUB_API_TOKEN: ${{ secrets.IWC_WORKFLOWS_BOT_TOKEN }}
      run: python workflows/enable_ci_workflows.py

Last fetched:

Triggers

pull_request

Jobs

Jobs for PR Test
Job Runs on Steps Actions used
build-and-test ubuntu-latest 10
actions/checkout@v4 actions/setup-python@v5 actions/setup-node@v4 actions/upload-artifact@v4
Raw YAML
name: PR Test

on:
  pull_request:
    types: [opened, synchronize, reopened]
    paths:
      - 'website/**'

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install Python Dependencies
        run: |
          pip install -r requirements.txt

      - name: Run generate_manifest.py
        run: python ./scripts/workflow_manifest.py

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          
      - name: Install NPM Dependencies
        run: npm install
        working-directory: ./website

      - name: Build Astro Static Site
        run: npm run build
        working-directory: ./website
        
      - name: Install Playwright
        run: npx playwright install --with-deps
        working-directory: ./website
        
      - name: Run E2E Tests
        run: npm run e2e
        working-directory: ./website
        
      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: playwright-report
          path: ./website/playwright-report
          retention-days: 30

Last fetched:

Triggers

push workflow_dispatch

Jobs

Jobs for Build and Deploy IWC Website
Job Runs on Steps Actions used
build-and-deploy ubuntu-latest 8
actions/checkout@v4 actions/setup-python@v5 actions/setup-node@v4 peaceiris/actions-gh-pages@v4
Raw YAML
name: Build and Deploy IWC Website

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install Python Dependencies
        run: |
          pip install -r requirements.txt

      - name: Run generate_manifest.py
        run: python ./scripts/workflow_manifest.py

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Install NPM Dependencies
        run: npm install
        working-directory: ./website

      - name: Build Astro Static Site
        run: npm run build
        working-directory: ./website

      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./website/dist

Last fetched:

Triggers

pull_request

Jobs

Jobs for Fallback
Job Runs on Steps Actions used
Check workflow success ubuntu-latest 1
Raw YAML
name: Fallback
# Fallback workflow that provides a succeeding "Check workflow success" job
# as this is a requirement for being able to merge a PR
# see https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
on:
  pull_request:
    paths:
      - 'scripts/**'
      - 'website/**'
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
jobs:
  determine-success:
    name: Check workflow success
    runs-on: ubuntu-latest
    steps:
      -  run: 'echo "No workflow tests required for this PR"'

Last fetched:

Triggers

workflow_call

Jobs

Jobs for Setup
Job Runs on Steps Actions used
Setup cache and determine changed repositories ubuntu-latest 8
actions/setup-python@v5 actions/cache@v4 actions/cache@v4 actions/checkout@v4 galaxyproject/planemo-ci-action@v1
Raw YAML
name: Setup
on:
  workflow_call:
    inputs:
      python-version-list:
        description: 'stringified JSON array of Python versions'
        default: "[\"3.11\"]"
        required: false
        type: string
      galaxy-fork:
        description: 'Galaxy fork to use'
        default: galaxyproject
        required: false
        type: string
      galaxy-branch:
        description: 'Galaxy branch to use'
        default: master
        required: false
        type: string
      max-chunks:
        description: 'maximum number of chunks to use'
        default: 0
        required: false
        type: number
    outputs:
      galaxy-head-sha:
        description: 'hash of the latest commit in the Galaxy repo'
        value: ${{ jobs.setup.outputs.galaxy-head-sha }}
      repository-list:
        description: 'list of repositories'
        value: ${{ jobs.setup.outputs.repository-list }}
      chunk-count:
        description: 'number of chunks'
        value: ${{ jobs.setup.outputs.chunk-count }}
      chunk-list:
        description: 'list of chunks'
        value: ${{ jobs.setup.outputs.chunk-list }}
jobs:
  setup:
    name: Setup cache and determine changed repositories
    runs-on: ubuntu-latest
    outputs:
      galaxy-head-sha: ${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }}
      repository-list: ${{ steps.discover.outputs.repository-list }}
      chunk-count: ${{ steps.discover.outputs.chunk-count }}
      chunk-list: ${{ steps.discover.outputs.chunk-list }}
    strategy:
      matrix:
        python-version: ${{ fromJson(inputs.python-version-list) }}
    steps:
    - name: Print github context properties
      run: |
        echo 'event: ${{ github.event_name }}'
        echo 'sha: ${{ github.sha }}'
        echo 'ref: ${{ github.ref }}'
        echo 'head_ref: ${{ github.head_ref }}'
        echo 'base_ref: ${{ github.base_ref }}'
        echo 'event.before: ${{ github.event.before }}'
        echo 'event.after: ${{ github.event.after }}'
    - name: Determine latest commit in the Galaxy repo
      id: get-galaxy-sha
      run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ inputs.galaxy-fork }}/galaxy refs/heads/${{ inputs.galaxy-branch }} | cut -f1)" >> $GITHUB_OUTPUT
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }}
    - name: Cache .planemo
      uses: actions/cache@v4
      id: cache-planemo
      with:
        path: ~/.planemo
        key: planemo_cache_py_${{ matrix.python-version }}_gxy_${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }}
    # Install the `wheel` package so that when installing other packages which
    # are not available as wheels, pip will build a wheel for them, which can be cached.
    - name: Install wheel
      run: pip install wheel
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
      uses: galaxyproject/planemo-ci-action@v1
      id: discover
      with:
        workflows: true
        create-cache: ${{ steps.cache-pip.outputs.cache-hit != 'true' || steps.cache-planemo.outputs.cache-hit != 'true' }}
        galaxy-fork: ${{ inputs.galaxy-fork }}
        galaxy-branch: ${{ inputs.galaxy-branch }}
        max-chunks: ${{ inputs.max-chunks }}
        python-version: ${{ matrix.python-version }}

Last fetched:

Triggers

issue_comment

Jobs

Jobs for Slash Command Dispatch
Job Runs on Steps Actions used
slashCommandDispatch ubuntu-latest 1
peter-evans/slash-command-dispatch@v4
Raw YAML
name: Slash Command Dispatch
on:
  issue_comment:
    types: [created]
jobs:
  slashCommandDispatch:
    runs-on: ubuntu-latest
    steps:
      - name: Slash Command Dispatch
        if: github.repository_owner == 'galaxyproject'
        uses: peter-evans/slash-command-dispatch@v4
        with:
          token: ${{ secrets.PAT }}
          commands: |
            run-all-workflow-tests

Last fetched:

Triggers

workflow_call

Jobs

Jobs for Test Galaxy workflows
Job Runs on Steps Actions used
Test workflows ubuntu-latest 7
actions/checkout@v4 actions/setup-python@v5 actions/cache@v4 insightsengineering/disk-space-reclaimer@v1 galaxyproject/planemo-ci-action@v1 actions/upload-artifact@v4 galaxyproject/planemo-ci-action@v1
Raw YAML
name: Test Galaxy workflows
on:
  workflow_call:
    inputs:
      galaxy-head-sha:
        description: 'hash of the latest commit in the Galaxy repo'
        required: true
        type: string
      chunk-count:
        description: 'number of tests to run in parallel'
        default: 1
        required: false
        type: number
      chunk-list:
        description: 'stringified JSON array of chunk IDs'
        default: "[0]"
        required: false
        type: string
      python-version-list:
        description: 'stringified JSON array of Python versions'
        default: "[\"3.11\"]"
        required: false
        type: string
      repository-list:
        description: 'list of repositories to test'
        default: ''
        required: false
        type: string
      galaxy-fork:
        description: 'Galaxy fork to use'
        default: galaxyproject
        required: false
        type: string
      galaxy-branch:
        description: 'Galaxy branch to use'
        default: master
        required: false
        type: string
      check-outputs:
        description: 'if true, check if any workflow test failed'
        default: false
        required: false
        type: boolean
jobs:
  test:
    name: Test workflows
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        chunk: ${{ fromJson(inputs.chunk-list) }}
        python-version: ${{ fromJson(inputs.python-version-list) }}
    services:
      postgres:
        image: postgres:11
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: postgres
        ports:
          - 5432:5432
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ inputs.galaxy-head-sha }}
    - name: Free Disk Space (Ubuntu)
      uses: insightsengineering/disk-space-reclaimer@v1
    - name: Planemo test workflows
      uses: galaxyproject/planemo-ci-action@v1
      id: test-workflows
      with:
        mode: test
        workflows: true
        setup-cvmfs: true
        repository-list: ${{ inputs.repository-list }}
        galaxy-fork: ${{ inputs.galaxy-fork }}
        galaxy-branch: ${{ inputs.galaxy-branch }}
        chunk: ${{ matrix.chunk }}
        chunk-count: ${{ inputs.chunk-count }}
    - uses: actions/upload-artifact@v4
      with:
        name: 'Workflow test output ${{ matrix.chunk }}'
        path: upload
    - name: Check outputs
      if: inputs.check-outputs
      uses: galaxyproject/planemo-ci-action@v1
      id: check
      with:
        mode: check

Last fetched:

Triggers

schedule

Jobs

Jobs for usegalaxy.* installation
Job Runs on Steps Actions used
workflow-install ubuntu-latest 3
actions/checkout@v4 actions/cache@v4
Raw YAML
name: usegalaxy.* installation

on:
  schedule:
    # Run at midnight every Thursday
    - cron: '0 0 * * 4'

jobs:
  workflow-install:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Cache downloads
        uses: actions/cache@v4
        with:
          path: |
            ~/.cache/pip
          key: py-cache
      - name: Run a multi-line script
        env:
          IWC_API_KEY_USEGALAXY_EU: ${{ secrets.IWC_API_KEY_USEGALAXY_EU }}
          IWC_API_KEY_USEGALAXY_ORG: ${{ secrets.IWC_API_KEY_USEGALAXY_ORG }}
          IWC_API_KEY_USEGALAXY_ORG_AU: ${{ secrets.IWC_API_KEY_USEGALAXY_ORG_AU }}
        run: |
          pip install bioblend
          python scripts/usegalaxy_star_upload.py

Last fetched:

Galaxy Workflow Tests for push and PR

.github/workflows/workflow_test.yml (opens in new tab)
Galaxy Workflow Tests for push and PR status

Triggers

push pull_request

Jobs

Jobs for Galaxy Workflow Tests for push and PR
Job Runs on Steps Actions used
Setup cache and determine changed repositories unknown 0
Lint workflows ubuntu-latest 5
actions/checkout@v4 actions/setup-python@v5 actions/cache@v4 galaxyproject/planemo-ci-action@v1
Test workflows unknown 0
Combine chunked test results ubuntu-latest 9
actions/download-artifact@v4 actions/setup-python@v5 actions/cache@v4 galaxyproject/planemo-ci-action@v1 actions/upload-artifact@v4 galaxyproject/planemo-ci-action@v1
Deploy ubuntu-latest 8
actions/checkout@v4 actions/setup-python@v5 actions/cache@v4 fusion-engineering/setup-git-credentials@v2 galaxyproject/planemo-ci-action@v1
Report deploy status ubuntu-latest 2
8BitJonny/gh-get-current-pr@3.0.0 peter-evans/create-or-update-comment@v4
Check workflow success ubuntu-latest 1
Raw YAML
# workflow level env vars cannot be used at the job level
# https://github.community/t/how-to-set-and-access-a-workflow-variable/17335/15
name: Galaxy Workflow Tests for push and PR
on:
  push:
    paths-ignore:
      - '**/*.md'
      - 'scripts/**'
      - 'website/**'
  pull_request:
    paths-ignore:
      - '**/*.md'
      - 'scripts/**'
      - 'website/**'
env:
  GITHUB_USER: iwc-workflows-bot
jobs:
  setup:
    name: Setup cache and determine changed repositories
    uses: ./.github/workflows/setup.yml
    with:
      python-version-list: "[\"3.11\"]"
      max-chunks: 4
      galaxy-fork: galaxyproject
      galaxy-branch: release_25.1

  # Planemo lint the changed repositories
  lint:
    name: Lint workflows
    needs: setup
    if: needs.setup.outputs.repository-list != ''
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.11']
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
    - name: Install wheel
      run: pip install wheel
    - name: Planemo lint workflows
      uses: galaxyproject/planemo-ci-action@v1
      id: lint
      with:
        mode: lint
        workflows: true
        repository-list: "${{ needs.setup.outputs.repository-list }}"
        additional-planemo-options: --iwc

  test:
    name: Test workflows
    needs: setup
    if: needs.setup.outputs.repository-list != ''
    uses: ./.github/workflows/test_workflows.yml
    with:
      galaxy-head-sha: ${{ needs.setup.outputs.galaxy-head-sha }}
      chunk-count: ${{ fromJSON(needs.setup.outputs.chunk-count) }}
      chunk-list: ${{ needs.setup.outputs.chunk-list }}
      python-version-list: "[\"3.11\"]"
      repository-list: ${{ needs.setup.outputs.repository-list }}
      galaxy-fork: galaxyproject
      galaxy-branch: release_25.1
      check-outputs: false

  combine_outputs:
    # same as tool step
    name: Combine chunked test results
    needs: [setup, test]
    strategy:
      matrix:
        python-version: ['3.11']
    runs-on: ubuntu-latest
    steps:
    - uses: actions/download-artifact@v4
      with:
        path: artifacts
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_{{ needs.setup.outputs.galaxy-head-sha }}
    - name: Combine outputs
      uses: galaxyproject/planemo-ci-action@v1
      id: combine
      with:
        mode: combine
        html-report: true
        markdown-report: true
    - run: cat upload/tool_test_output.md >> $GITHUB_STEP_SUMMARY
    - name: Save PR number
      run: echo ${{ github.event.number }} > ./upload/NR
    - name: Debug PR number
      run: |
          cat ./upload/NR
    - uses: actions/upload-artifact@v4
      with:
        name: 'All tool test results'
        path: upload
    - name: Check outputs
      uses: galaxyproject/planemo-ci-action@v1
      id: check
      with:
        mode: check

  # deploy workflows to organization
  deploy:
    name: Deploy
    needs: [setup,test,combine_outputs]
    strategy:
      matrix:
        python-version: ['3.11']
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main' && github.repository_owner == 'galaxyproject'
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Cache .cache/pip
      uses: actions/cache@v4
      id: cache-pip
      with:
        path: ~/.cache/pip
        key: pip_cache_py_${{ matrix.python-version }}_gxy_{{ needs.setup.outputs.galaxy-head-sha }}
    - name: Install requirements for gen_crates.py
      run: pip install -r workflows/requirements.txt
    - name: Generate RO-Crate metadata for workflow repositories
      run: python workflows/gen_crates.py workflows
    - name: Set git user
      run: |
        git config --global user.email "$GITHUB_USER@galaxyproject.org"
        git config --global user.name "$GITHUB_USER"
        git config --global init.defaultBranch main
    - uses: fusion-engineering/setup-git-credentials@v2
      with:
        credentials: 'https://${{ env.GITHUB_USER }}:${{ secrets.IWC_WORKFLOWS_BOT_TOKEN }}@github.com/'
    - name: Update or create repositories in github namespace
      uses: galaxyproject/planemo-ci-action@v1
      with:
         mode: deploy
         repository-list: ${{ needs.setup.outputs.repository-list }}
         workflows: true
         workflow-namespace: iwc-workflows
         github-token: ${{ secrets.IWC_WORKFLOWS_BOT_TOKEN }}

  deploy-report:
    name: Report deploy status
    needs: [deploy]
    if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'galaxyproject' }}
    runs-on: ubuntu-latest
    steps:
    # report to the PR if deployment failed
    - name: Get PR object
      uses: 8BitJonny/gh-get-current-pr@3.0.0
      id: getpr
      with:
        sha: ${{ github.event.after }}
    - name: Create comment
      uses: peter-evans/create-or-update-comment@v4
      with:
        token: ${{ secrets.PAT }}
        issue-number: ${{ steps.getpr.outputs.number }}
        body: |
          Attention: deployment ${{ needs.deploy.result }}!

          https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

  determine-success:
    name: Check workflow success
    needs: [setup, lint, combine_outputs]
    if: ${{ always() && github.ref != 'refs/heads/main' }}
    runs-on: ubuntu-latest
    steps:
    - name: Check status
      if: ${{ needs.combine_outputs.result != 'skipped' && (needs.lint.result != 'success' || needs.combine_outputs.result != 'success') }}
      run: exit 1

Last fetched: