mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #10674 from nsoranzo/api_tests_gh_wf
Migrate API tests to GitHub workflow
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: API tests
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
GALAXY_TEST_DBURI: 'postgres://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8'
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.7']
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:11
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'galaxy root'
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Cache pip dir
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
|
||||
- name: Run tests
|
||||
run: ./run_tests.sh --skip_flakey_fails -api
|
||||
working-directory: 'galaxy root'
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: API test results
|
||||
path: 'galaxy root/run_api_tests.html'
|
||||
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import shlex
|
||||
import tempfile
|
||||
|
||||
|
||||
@@ -494,11 +495,12 @@ class ToolEvaluator:
|
||||
raise
|
||||
if interpreter:
|
||||
# TODO: path munging for cluster/dataset server relocatability
|
||||
executable = command_line.split()[0]
|
||||
command_line_tokens = shlex.split(command_line)
|
||||
executable = command_line_tokens[0]
|
||||
tool_dir = os.path.abspath(self.tool.tool_dir)
|
||||
abs_executable = os.path.join(tool_dir, executable)
|
||||
command_line = command_line.replace(executable, abs_executable, 1)
|
||||
command_line = interpreter + " " + command_line
|
||||
command_line_tokens[0:1] = [interpreter, abs_executable]
|
||||
command_line = ' '.join(map(shlex.quote, command_line_tokens))
|
||||
self.command_line = command_line
|
||||
|
||||
def __build_config_files(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<tool id="mapper" name="Mapper" version="0.1.0">
|
||||
<command>
|
||||
cp $__tool_directory__/1.bam $out_file1
|
||||
</command>
|
||||
<command><![CDATA[
|
||||
cp '$__tool_directory__/1.bam' '$out_file1'
|
||||
]]></command>
|
||||
<inputs>
|
||||
<param name="input1" type="data" format="fastq" label="Fastq Input"/>
|
||||
<param name="reference" type="data" format="fasta" label="Fasta Input"/>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<tool id="mapper2" name="mapper2" version="0.1.0">
|
||||
<command>
|
||||
cp $__tool_directory__/1.bam $out_file1
|
||||
</command>
|
||||
<command><![CDATA[
|
||||
cp '$__tool_directory__/1.bam' '$out_file1'
|
||||
]]></command>
|
||||
<inputs>
|
||||
<!-- Conditional input block loosely based on bwa-mem. -->
|
||||
<conditional name="fastq_input">
|
||||
<param name="fastq_input_selector" type="select" label="Single or Paired-end reads">
|
||||
<option value="paired">Paired</option>
|
||||
<option value="single">Single</option>
|
||||
<option value="paired_collection">Paired Collection</option>
|
||||
<option value="paired_iv">Paired Interleaved</option>
|
||||
</param>
|
||||
<when value="paired">
|
||||
<param name="fastq_input1" type="data" format="fastq" label="Select first set of reads" />
|
||||
<param name="fastq_input2" type="data" format="fastq" label="Select second set of reads" />
|
||||
</when>
|
||||
<when value="single">
|
||||
<param name="fastq_input1" type="data" format="fastq" label="Select fastq dataset"/>
|
||||
</when>
|
||||
<when value="paired_collection">
|
||||
<param name="fastq_input1" format="fastq" type="data_collection" collection_type="paired" label="Select a paired collection" />
|
||||
</when>
|
||||
<when value="paired_iv">
|
||||
<param name="fastq_input1" type="data" format="fastq" label="Select fastq dataset" />
|
||||
</when>
|
||||
<param name="fastq_input_selector" type="select" label="Single or Paired-end reads">
|
||||
<option value="paired">Paired</option>
|
||||
<option value="single">Single</option>
|
||||
<option value="paired_collection">Paired Collection</option>
|
||||
<option value="paired_iv">Paired Interleaved</option>
|
||||
</param>
|
||||
<when value="paired">
|
||||
<param name="fastq_input1" type="data" format="fastq" label="Select first set of reads" />
|
||||
<param name="fastq_input2" type="data" format="fastq" label="Select second set of reads" />
|
||||
</when>
|
||||
<when value="single">
|
||||
<param name="fastq_input1" type="data" format="fastq" label="Select fastq dataset"/>
|
||||
</when>
|
||||
<when value="paired_collection">
|
||||
<param name="fastq_input1" type="data_collection" collection_type="paired" format="fastq" label="Select a paired collection" />
|
||||
</when>
|
||||
<when value="paired_iv">
|
||||
<param name="fastq_input1" type="data" format="fastq" label="Select fastq dataset" />
|
||||
</when>
|
||||
</conditional>
|
||||
<param name="reference" type="data" format="fasta" label="Fasta Input"/>
|
||||
</inputs>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<tool id="pileup" name="Pileup" version="0.1.0">
|
||||
<command>
|
||||
printf "Summary" > $out_file1
|
||||
</command>
|
||||
<command><![CDATA[
|
||||
printf 'Summary' > '$out_file1'
|
||||
]]></command>
|
||||
<inputs>
|
||||
<param name="input1" type="data" format="bam" multiple="true" label="BAM Inputs" min="1">
|
||||
<param name="input1" type="data" format="bam" multiple="true" min="1" label="BAM Inputs">
|
||||
<validator check="bam_index" message="Metadata missing, click the pencil icon in the history item and use the auto-detect feature to correct this issue." type="metadata" />
|
||||
</param>
|
||||
<param name="reference" type="data" format="fasta" label="Fasta Input"/>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<tool id="cat1" name="Concatenate datasets" version="1.0.0">
|
||||
<description>tail-to-head</description>
|
||||
<command interpreter="python">
|
||||
catWrapper.py
|
||||
$out_file1
|
||||
$input1
|
||||
#for $q in $queries
|
||||
${q.input2}
|
||||
#end for
|
||||
</command>
|
||||
<command interpreter="python"><![CDATA[
|
||||
catWrapper.py
|
||||
'$out_file1'
|
||||
'$input1'
|
||||
#for $q in $queries
|
||||
'${q.input2}'
|
||||
#end for
|
||||
]]></command>
|
||||
<inputs>
|
||||
<param name="input1" type="data" label="Concatenate Dataset"/>
|
||||
<repeat name="queries" title="Dataset">
|
||||
@@ -33,8 +33,7 @@
|
||||
</test>
|
||||
-->
|
||||
</tests>
|
||||
<help>
|
||||
|
||||
<help><![CDATA[
|
||||
.. class:: warningmark
|
||||
|
||||
**WARNING:** Be careful not to concatenate datasets of different kinds (e.g., sequences with intervals). This tool does not check if the datasets being concatenated are in the same format.
|
||||
@@ -74,6 +73,5 @@ will result in the following::
|
||||
chr1 151278832 151279227 Z 0 -
|
||||
chr2 100000030 200000955 P 0 +
|
||||
chr2 100000015 200000999 Q 0 +
|
||||
|
||||
</help>
|
||||
]]></help>
|
||||
</tool>
|
||||
|
||||
Reference in New Issue
Block a user