Skip to content

chore(deps): bump tj-actions/changed-files from 37 to 38 #38

chore(deps): bump tj-actions/changed-files from 37 to 38

chore(deps): bump tj-actions/changed-files from 37 to 38 #38

Workflow file for this run

name: PullRequestWorkflow
on:
pull_request:
types:
- edited
- opened
- reopened
- synchronize
pull_request_target:
types:
- closed
jobs:
list:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
nb: ${{ steps.set-matrix.outputs.nb }}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Select modified files'
id: files
#uses: Ana06/[email protected]
uses: tj-actions/changed-files@v38
with:
files: workflows/**
separator: ","
- name: 'List repos'
id: set-matrix
run: |
echo "list file modified"
echo ${{ steps.files.outputs.all_changed_and_modified_files }}
matrix=$(echo ${{ steps.files.outputs.all_changed_and_modified_files }} | jq -R -s -c 'split(",") | map(select(contains("workflows"))) | map(split("/")[1]) | sort | unique')
echo "list of repo: ${matrix}"
echo "matrix=$matrix" >> "${GITHUB_OUTPUT}"
nb=$(echo ${matrix} | jq -s -c '.[] | length')
echo "Number of repos: ${nb}"
echo "nb=$nb" >> "${GITHUB_OUTPUT}"
skip:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'List repos'
id: set-matrix
run: |
matrix=$(jq -R -s -c '[split("\n")[] | select(.|length>0)]' .github/workflows/test_workflows_skip.txt)
echo "Number of repos: ${matrix}"
echo "matrix=$matrix" >> "${GITHUB_OUTPUT}"
test:
needs: [list, skip]
if: ${{ github.event.pull_request.merged == false && needs.list.outputs.nb > 0 }}
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
repo: ${{ fromJson(needs.list.outputs.matrix) }}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: "Setup python"
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
cache-dependency-path: |
env/requirements.txt
- name: 'Install packages'
run: |
pip install -r env/requirements.txt
- name: 'Worfklow Lint'
run: |
planemo workflow_lint \
--fail_level error \
"workflows/${{ matrix.repo }}"
- name: 'Test tool'
if: ${{ ! contains(fromJson(needs.skip.outputs.matrix), matrix.repo) }}
timeout-minutes: 60
run: |
planemo test \
--engine external_galaxy \
--galaxy_url https://galaxy-synbiocad.org \
--galaxy_user_key "${{ secrets.GG_SYNBIOCAD_TOKEN }}" \
"workflows/${{ matrix.repo }}/${{ matrix.repo }}.ga"
shed:
needs: list
if: ${{ github.event.pull_request.merged == true && needs.list.outputs.nb > 0 }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 1
matrix:
repo: ${{ fromJson(needs.list.outputs.matrix) }}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: "Setup python"
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
cache-dependency-path: |
env/requirements.txt
- name: 'Install packages'
run: |
pip install -r env/requirements.txt
- name: 'Deploy'
run: |
./scripts/upload_workflow.py \
--workflow "workflows/${{ matrix.repo }}/${{ matrix.repo }}.ga" \
--galaxy_url https://galaxy-synbiocad.org \
--galaxy_user_key "${{ secrets.GG_SYNBIOCAD_TOKEN }}"