Skip to content

Integration Tests #1148

Integration Tests

Integration Tests #1148

name: Integration Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_run:
workflows: ["Pull latest UShER Source"]
branches: [ master ]
types:
- completed
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Pull latest tree
run: |
wget ${{ secrets.GLOBAL_TREE_PATH }}
ls
- name: Checkout ShUShER
uses: actions/checkout@v2
- name: Parse UShER Version
run: echo "USHER_VERSION=$(cat ./usher_version.txt)" >> $GITHUB_ENV
- name: Checkout UShER
uses: actions/checkout@v2
with:
repository: yatisht/usher
ref: ${{ env.USHER_VERSION }}
path: usher
- name: Compile and run UShER (C++)
working-directory: usher
run: |
sudo install/installUbuntu.sh
wget https://hgwdev.gi.ucsc.edu/~angie/UShER_SARS-CoV-2/2021/01/20/public-2021-01-20.all.masked.pb.gz
build/usher -k50 -i public-2021-01-20.all.masked.pb.gz -d . -v ../usher-port/test/preload/test_samples.vcf
- name: Compile and run UShER (WebAssembly)
working-directory: usher-port
run: |
sudo apt-get update
sudo apt-get install wget python3 build-essential cmake protobuf-compiler dh-autoreconf
./installUbuntuWeb.sh test
node --experimental-wasm-threads build/usher.js -k50 -i ../usher/public-2021-01-20.all.masked.pb.gz -T1 -d . -v test/preload/test_samples.vcf
echo "DIFF_PASSED=1" >> $GITHUB_ENV
cmp ../usher/final-tree.nh ./final-tree.nh || echo "DIFF_PASSED=0" >> $GITHUB_ENV
cmp ../usher/mutation-paths.txt ./mutation-paths.txt || echo "DIFF_PASSED=0" >> $GITHUB_ENV
- name: Check diffs
if: ${{ env.DIFF_PASSED == 0 }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('The output files of UShER and ShUSHER do not match.')