get_sbml_model, enable to load file from history #117
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PullRequest | |
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@v37 | |
with: | |
files: tools/** | |
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("tools"))) | 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_tools_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: 'Wrapper Lint' | |
run: | | |
planemo lint "tools/${{ matrix.repo }}" | |
# no DOI checked due to restricted access | |
- name: 'Shed lint' | |
run: | | |
planemo shed_lint --urls --xsd --ensure_metadata "tools/${{ matrix.repo }}" | |
./scripts/shed_lint.py -i "tools/${{ matrix.repo }}" | |
- name: 'Test tool' | |
if: ${{ ! contains(fromJson(needs.skip.outputs.matrix), matrix.repo) }} | |
timeout-minutes: 120 | |
continue-on-error: true | |
run: | | |
planemo test \ | |
--biocontainers \ | |
--no_dependency_resolution \ | |
--no_conda_auto_init \ | |
--galaxy_source https://github.com/galaxyproject/galaxy \ | |
--galaxy_branch release_22.05 \ | |
--galaxy_python_version 3.7 \ | |
"tools/${{ matrix.repo }}" | |
- name: 'Prepare artefact' | |
run: | | |
touch tool_test_output.html tool_test_output.json | |
zip -9 ${{ matrix.repo }}.zip tool_test_output.html tool_test_output.json | |
- name: 'Upload Artifact Version' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.repo }}-artifact | |
path: ${{ matrix.repo }}.zip | |
- name: 'Aggregate results' | |
if: ${{ ! contains(fromJson(needs.skip.outputs.matrix), matrix.repo) }} | |
run: | | |
./scripts/aggregate_test.py -i . | |
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: 'Test ToolShed' | |
run: | | |
planemo shed_update --force_repository_creation --shed_target testtoolshed --shed_key "${{ secrets.TESTTOOLSHED }}" "tools/${{ matrix.repo }}" || planemo shed_update --force_repository_creation --shed_target testtoolshed --shed_key "${{ secrets.TESTTOOLSHED }}" "tools/${{ matrix.repo }}" | |
- name: 'Main ToolShed' | |
run: | | |
planemo shed_update --force_repository_creation --shed_target toolshed --shed_key "${{ secrets.TOOLSHED }}" "tools/${{ matrix.repo }}" || planemo shed_update --force_repository_creation --shed_target toolshed --shed_key "${{ secrets.TOOLSHED }}" "tools/${{ matrix.repo }}" | |
- name: 'Create release' | |
uses: ./.github/workflows/release.yml |