Skip to content

Commit

Permalink
removing remaining travis infrastrucutre and updating some wdl test p…
Browse files Browse the repository at this point in the history
…aths
  • Loading branch information
jamesemery committed Apr 8, 2022
1 parent b9c9edd commit 69861d4
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 281 deletions.
9 changes: 6 additions & 3 deletions .github/actions/upload-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ runs:
path: build/reports/tests

- name: Upload Reports
id: uploadreports
run: |
gsutil -m cp -z html -z js -z xml -z css -r build/reports/tests gs:/${{ env.HELLBENDER_TEST_LOGS }}${{ inputs.repo-path }}/;
echo "See the test report at https://storage.googleapis.com${{ env.HELLBENDER_TEST_LOGS }}${{ inputs.repo-path }}/tests/test/index.html";
VIEW_URL=https://storage.googleapis.com${{ env.HELLBENDER_TEST_LOGS }}${{ inputs.repo-path }}/tests/test/index.html
echo "See the test report at ${VIEW_URL}";
echo ::set-output name=view_url::"${VIEW_URL}"
shell: bash

# This code is necessary in order to extract the URL for the logs for a particular run. The github context exposes the run_id object
Expand All @@ -68,7 +71,7 @@ runs:
echo ${html_url}
shell: bash

- name: Updating the PR travis results
- name: Updating the PR with failed results
if: ${{ inputs.warnPR == 'true' }}
env:
GITHUB_TOKEN: ${{ inputs.bot-comment-key }}
Expand All @@ -82,5 +85,5 @@ runs:
GITHUB_LOGS_URL: ${{ steps.loghtml.outputs.html_url }}
run: |
pip install --user PyGithub;
python scripts/github_actions/Reporter.py https://storage.googleapis.com${{ env.HELLBENDER_TEST_LOGS }}${{ inputs.repo-path }}/tests/test/index.html;
python scripts/github_actions/Reporter.py ${{ steps.uploadreports.outputs.view_url }};
shell: bash
11 changes: 7 additions & 4 deletions .github/workflows/gatk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

#Run our non-docker tests
test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -109,13 +110,14 @@ jobs:
run: ./gradlew compileTestJava

- name: run-tests
id: jacoco-tests
run: |
./gradlew -Dscala.version=${{ env.SCALA_VERSION }} test jacocoTestReport
- uses: /broadinstitute/gatk/.github/actions/upload-results@lb_github_actions
if: always()
with:
warnPR: ${{ github.event_name == 'pull_request' && steps.run-docker-tests.outcome != 'success' }}
warnPR: ${{ github.event_name == 'pull_request' && steps.jacoco-tests.outcome != 'success' }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
jdk-version: ${{ matrix.Java }}
test-type: ${{ matrix.testType }}
Expand Down Expand Up @@ -186,6 +188,7 @@ jobs:
run: git lfs pull

- name: run-docker-tests
id: docker-jacocco-tests
run: |
docker run \
-v $(pwd):/gatkCloneMountPoint:cached \
Expand All @@ -206,7 +209,7 @@ jobs:
- uses: /broadinstitute/gatk/.github/actions/upload-results@lb_github_actions
if: always()
with:
warnPR: ${{ github.event_name == 'pull_request' && steps.run-docker-tests.outcome != 'success' }}
warnPR: ${{ github.event_name == 'pull_request' && steps.docker-jacocco-tests.outcome != 'success' }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
jdk-version: ${{ matrix.Java }}
test-type: docker ${{ matrix.testType }}
Expand Down Expand Up @@ -266,9 +269,9 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]
then
echo "TRAVIS_PULL_REQUEST=${{ github.event.number }}" >> $GITHUB_ENV
echo "CI_PULL_REQUEST=${{ github.event.number }}" >> $GITHUB_ENV
fi
echo "TRAVIS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "CI_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
- name: "Installing GATK for tests"
run: |
Expand Down
228 changes: 0 additions & 228 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/cnn_variant_cromwell_tests/run_cnn_variant_wdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ echo "Building docker without running unit tests... ========="
cd $WORKING_DIR/gatk

# IMPORTANT: This code is duplicated in the cnv and M2 WDL test.
if [ ! -z "$TRAVIS_PULL_REQUEST" ]; then
if [ ! -z "$CI_PULL_REQUEST" ]; then
HASH_TO_USE=FETCH_HEAD
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/ -t ${TRAVIS_PULL_REQUEST};
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/ -t ${CI_PULL_REQUEST};
echo "using fetch head:"$HASH_TO_USE
else
HASH_TO_USE=${TRAVIS_COMMIT}
HASH_TO_USE=${CI_COMMIT}
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/;
echo "using travis commit:"$HASH_TO_USE
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ pushd .
echo "Building docker without running unit tests... ========="
cd $WORKING_DIR/gatk
# IMPORTANT: This code is duplicated in the M2 WDL test.
if [ ! -z "$TRAVIS_PULL_REQUEST" ]; then
if [ ! -z "$CI_PULL_REQUEST" ]; then
HASH_TO_USE=FETCH_HEAD
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/ -t ${TRAVIS_PULL_REQUEST};
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/ -t ${CI_PULL_REQUEST};
else
HASH_TO_USE=${TRAVIS_COMMIT}
HASH_TO_USE=${CI_COMMIT}
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/;
fi
echo "Docker build done =========="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"CNVSomaticPairWorkflow.intervals": "/home/runner/work/gatk/gatk/src/test/resources/large/cnv_somatic_workflows_test_files/ice_targets_sample-chr20.interval_list",
"CNVSomaticPairWorkflow.is_run_funcotator": "true",
"CNVSomaticPairWorkflow.funcotator_is_removing_untared_datasources": "true",
"CNVSomaticPairWorkflow.funcotator_data_sources_tar_gz": "/home/travis/build/broadinstitute/ds.tar.gz",
"CNVSomaticPairWorkflow.funcotator_data_sources_tar_gz": "/home/runner/work/gatk/gatk/build/broadinstitute/ds.tar.gz",
"CNVSomaticPairWorkflow.normal_bam": "/home/runner/work/gatk/gatk/src/test/resources/large/cnv_somatic_workflows_test_files/SM-74NEG-v1-chr20-downsampled.deduplicated.cram",
"CNVSomaticPairWorkflow.normal_bam_idx": "/home/runner/work/gatk/gatk/src/test/resources/large/cnv_somatic_workflows_test_files/SM-74NEG-v1-chr20-downsampled.deduplicated.cram.crai",
"CNVSomaticPairWorkflow.read_count_pon": "/home/runner/work/gatk/gatk/src/test/resources/large/cnv_somatic_workflows_test_files/wes-do-gc.pon.hdf5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ pushd .
echo "Building docker without running unit tests... ========="
cd $WORKING_DIR/gatk
# IMPORTANT: This code is duplicated in the M2 WDL test.
if [ ! -z "$TRAVIS_PULL_REQUEST" ]; then
if [ ! -z "$CI_PULL_REQUEST" ]; then
HASH_TO_USE=FETCH_HEAD
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/ -t ${TRAVIS_PULL_REQUEST};
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/ -t ${CI_PULL_REQUEST};
else
HASH_TO_USE=${TRAVIS_COMMIT}
HASH_TO_USE=${CI_COMMIT}
sudo bash build_docker.sh -e ${HASH_TO_USE} -s -u -d $PWD/temp_staging/;
fi
echo "Docker build done =========="
Expand Down Expand Up @@ -68,7 +68,7 @@ java -jar ${CROMWELL_JAR} run $WORKING_DIR/gatk/scripts/cnv_wdl/somatic/cnv_soma
echo "Preparing small gencode-only datasource dir for funcotator test..."
pushd .
cd $WORKING_DIR/gatk/src/test/resources/org/broadinstitute/hellbender/tools/funcotator/
tar zcvf $WORKING_DIR/build/broadinstitute/ds.tar.gz small_cntn4_ds/gencode_cntn4/
tar zcvf $WORKING_DIR/gatk/build/broadinstitute/ds.tar.gz small_cntn4_ds/gencode_cntn4/
popd

# Pair WES with funcotator
Expand Down
2 changes: 1 addition & 1 deletion scripts/github_actions/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
These scripts are intended to be run on Travis CI and may not run correctly outside of that environment.
These scripts are intended to be run on github-actions CI and may not run correctly outside of that environment.
2 changes: 1 addition & 1 deletion scripts/github_actions/Reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This script creates a comment on github using the API token provided through GITHUB_API_TOKEN
# It first checks if a comment already exists which was made with the given identity
# and which mentions the same travis build ID as the current running one in the first line of the comment.
# and which mentions the same github actions build ID as the current running one in the first line of the comment.
# If no comment is found it creates a new one with a header and the log url.
# If a matching comment is found this appends it's log information to the existing comment.
#
Expand Down
4 changes: 0 additions & 4 deletions scripts/github_actions/check_for_pull_request

This file was deleted.

Loading

0 comments on commit 69861d4

Please sign in to comment.