Skip to content

Commit

Permalink
Modify check_tab_delimited to ignore headers starting with # (#30)
Browse files Browse the repository at this point in the history
* Modify check_tab_delimited to ignore headers starting with #

* Use the most recent annotated tag in releases

* Bump version

---------

Co-authored-by: Heather Ward <[email protected]>
  • Loading branch information
kfang4 and hkeward authored Jun 12, 2023
1 parent bccdcf4 commit 866db31
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: prep
run: |
IMAGE="dnastack/wdl-ci"
VERSION_TAG=`git describe --tags`
VERSION_TAG=`git describe --tags --abbrev=0`
LONG_VERSION_TAG=`git describe --tags --long --always`
LATEST_TAG="latest"
ALL_TAGS="${IMAGE}:${VERSION_TAG},${IMAGE}:${LONG_VERSION_TAG},${IMAGE}:${LATEST_TAG}"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If any step of the action fails, the check will fail; however if some task tests
# GitHub action usage

```yaml
- uses: dnastack/[email protected].8
- uses: dnastack/[email protected].9
with:
# Configuration file where tests can be found
# Default: wdl-ci.config.json
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
with:
submodules: true
- name: wdl-ci
uses: dnastack/[email protected].8
uses: dnastack/[email protected].9
with:
wallet-url: ${{ secrets.WALLET_URL }}
wallet-client-id: ${{ secrets.WALLET_CLIENT_ID }}
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: wdl-ci
uses: dnastack/[email protected].8
uses: dnastack/[email protected].9
with:
wallet-url: ${{ secrets.WALLET_URL }}
wallet-client-id: ${{ secrets.WALLET_CLIENT_ID }}
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: wdl-ci
uses: dnastack/[email protected].8
uses: dnastack/[email protected].9
with:
wallet-url: ${{ secrets.WALLET_URL }}
wallet-client-id: ${{ secrets.WALLET_CLIENT_ID }}
Expand Down
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ runs:
echo "WDL_CI_CUSTOM_TEST_WDL_DIR"=${{ inputs.wdl_ci_custom_test_wdl_dir }} >> $GITHUB_ENV
fi
- name: lint
uses: docker://dnastack/wdl-ci:v0.1.8
uses: docker://dnastack/wdl-ci:v0.1.9
with:
args: lint
- name: detect-changes
uses: docker://dnastack/wdl-ci:v0.1.8
uses: docker://dnastack/wdl-ci:v0.1.9
with:
args: detect-changes
- name: submit
uses: docker://dnastack/wdl-ci:v0.1.8
uses: docker://dnastack/wdl-ci:v0.1.9
with:
args: submit
- name: monitor
uses: docker://dnastack/wdl-ci:v0.1.8
uses: docker://dnastack/wdl-ci:v0.1.9
with:
args: monitor --update-digests
# If a test fails, still update task digests for any tests that succeeded
Expand All @@ -76,6 +76,6 @@ runs:
default_author: github_actions
- name: cleanup
if: always()
uses: docker://dnastack/wdl-ci:v0.1.8
uses: docker://dnastack/wdl-ci:v0.1.9
with:
args: cleanup
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "wdl-testing-cli"
description = "DNAstack WDL testing CLI"
version = "v0.1.8"
version = "v0.1.9"
authors = [
{ name = "DNAstack", email = "[email protected]" }
]
Expand Down
5 changes: 3 additions & 2 deletions src/wdlci/wdl_tests/check_tab_delimited.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ task check_tab_delimited {
# Validated dir path in input block vs. command block is different
validated_dir_path=$(dirname ~{validated_output})

if ! awk '{exit !/\t/}' "${validated_dir_path}/$(basename ~{validated_output} .gz)"; then
# Disregard headers starting with `#`
if ! sed '/^#/d' "${validated_dir_path}/$(basename ~{validated_output} .gz)" | awk '{exit !/\t/}'; then
err "Validated file: [~{basename(validated_output)}] is not tab-delimited"
exit 1
else
if awk '{exit !/\t/}' ~{current_run_output_unzipped}; then
if sed '/^#/d' ~{current_run_output_unzipped} | awk '{exit !/\t/}'; then
echo "Current run file: [~{basename(current_run_output)}] is tab-delimited"
else
err "Current run file: [~{basename(current_run_output)}] is not tab-delimited"
Expand Down

0 comments on commit 866db31

Please sign in to comment.