Skip to content

Commit

Permalink
update ci.yml, touch.cwl and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NishchayKarle committed Feb 17, 2024
1 parent c505a4d commit 5c2077e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 36 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ jobs:
strategy:
fail-fast: false # if true, then if one task fails all fails, but we need which version is failing
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [ubuntu-latest]
python-version:
- "3.9"
- "3.12"

name: Test
runs-on: ${{ matrix.os }}
Expand Down
68 changes: 35 additions & 33 deletions tests/test_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,41 @@
test_report_files = os.path.join(os.getcwd(), "tests", "test-reports")


# def test_find() -> None:
# """Test for the find CWL CommandLineTool."""
# # Test 1
# find(
# dir=".",
# maxdepth=3,
# name="*.cwl",
# redirect_to_file=os.path.join(test_runtime_files, "find_stdout_1.txt"),
# output_file=File(os.path.join(test_runtime_files, "find_stdout_1.txt")),
# ).result()

# # Test 2
# find(
# dir=".",
# name="*.cwl",
# redirect_to_file=os.path.join(test_runtime_files, "find_stdout_2.txt"),
# output_file=File(os.path.join(test_runtime_files, "find_stdout_2.txt")),
# ).result()


# def test_touch() -> None:
# """Test for the touch CWL CommandLineTool."""
# # Test 1
# touch(
# filenames=[
# os.path.join(test_runtime_files, "touch1.txt"),
# os.path.join(test_runtime_files, "touch2.txt"),
# ],
# output_files=[
# File(os.path.join(test_runtime_files, "touch1.txt")),
# File(os.path.join(test_runtime_files, "touch2.txt")),
# ],
# ).result()
def test_find() -> None:
"""Test for the find CWL CommandLineTool."""
# Test 1
find(
dir=".",
maxdepth=3,
name="*.cwl",
redirect_to_file=os.path.join(test_runtime_files, "find_stdout_1.txt"),
output_file=File(os.path.join(test_runtime_files, "find_stdout_1.txt")),
).result()

# Test 2
find(
dir=".",
name="*.cwl",
redirect_to_file=os.path.join(test_runtime_files, "find_stdout_2.txt"),
output_file=File(os.path.join(test_runtime_files, "find_stdout_2.txt")),
).result()


def test_touch() -> None:
"""Test for the touch CWL CommandLineTool."""
# Test 1
touch(
filenames=[
os.path.join(test_runtime_files, "test1.txt"),
os.path.join(test_runtime_files, "test2.txt"),
],
output_files=[
File(os.path.join(test_runtime_files, "test1.txt")),
File(os.path.join(test_runtime_files, "test2.txt")),
],
stdout=os.path.join(test_runtime_files, "touch_stdout.stdout"),
stderr=os.path.join(test_runtime_files, "touch_stderr.stderr"),
).result()


def test_word_count() -> None:
Expand Down
6 changes: 5 additions & 1 deletion tools/cwl_files/touch.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ outputs:
type: array
items: File
outputBinding:
glob: $(inputs.filenames)
glob: $(inputs.filenames)
stdout:
type: stdout
stderr:
type: stderr

0 comments on commit 5c2077e

Please sign in to comment.