-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 2.44 KB
/
test_tool.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 }}