run-tool-test-command #265
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: Run tool test against galaxy server | |
on: | |
repository_dispatch: | |
types: [run-tool-test-command] | |
jobs: | |
setup: | |
name: Run test | |
if: github.repository_owner == 'mvdbeek' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7] | |
steps: | |
- name: Add reaction | |
uses: peter-evans/create-or-update-comment@v1 | |
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 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install galaxy-tool-util | |
run: pip install 'galaxy-tool-util>=21.1.0.dev3' pysam | |
- name: Install planemo | |
run: git clone --recursive https://github.com/galaxyproject/planemo && pip install planemo/ | |
- name: Run tool test | |
if: ${{ github.event.client_payload.slash_command.args.named.server != 'https://test.galaxyproject.org' }} | |
run: galaxy-tool-test -u https://usegalaxy.org -k "${{ secrets.GALAXY_API_KEY }}" -t "${{github.event.client_payload.slash_command.args.named.tool_id}}" -j test_result.json --parallel-tests 10 --download-attempts 32 --download-sleep 2 | |
- name: Run tool test | |
if: ${{ github.event.client_payload.slash_command.args.named.server == 'https://test.galaxyproject.org' }} | |
run: galaxy-tool-test -u https://test.galaxyproject.org -k "${{ secrets.TEST_API_KEY }}" -t "${{github.event.client_payload.slash_command.args.named.tool_id}}" -j test_result.json --parallel-tests 10 --download-attempts 32 --download-sleep 2 | |
- name: Create test markdown report | |
if: always() | |
run: planemo test_reports test_result.json --test_output_markdown report.md | |
- name: Read report | |
if: always() | |
id: report | |
run: | | |
body=$(cat report.md) | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "::set-output name=markdown::$body" | |
- name: Create comment | |
if: always() | |
uses: peter-evans/create-or-update-comment@v1 | |
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: | | |
${{ steps.report.outputs.markdown }} |