APPS-2558 dxCompiler | Internal documentation, automation for custome… #3117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
types: | |
- opened | |
- synchronize | |
- labeled | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: read | |
jobs: | |
test: | |
name: Scala Unit Tests (Staging) | |
if: "!contains(github.event.pull_request.labels.*.name, 'minor') && !contains(github.event.pull_request.labels.*.name, 'dxcint')" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v2 | |
# performance optimizations https://abbbi.github.io/actions/ | |
- uses: abbbi/github-actions-tune@v1 | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Clone corpora | |
run: | | |
cd compiler/src/test/resources | |
./clone-corpora.sh | |
- name: Run unit tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AUTH_TOKEN: ${{ secrets.DX_STAGING_TEST_ROBOT_TOKEN }} | |
SBT_OPTS: "-XX:+CMSClassUnloadingEnabled -Xmx4G -Xms1G" | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https wget git openssh-server tree python3 python3-pip python3-venv | |
cwltool=`jq -r '.execDepends.cwl[0].version' scripts/bundled_dependencies.json` | |
salad=`jq -r '.execDepends.cwl[1].version' scripts/bundled_dependencies.json` | |
pip3 install --upgrade pip setuptools==58.3.0 | |
pip3 install termcolor dxpy==0.323.0 cwltool==$cwltool schema-salad==$salad pyOpenSSL==22.0.0 | |
export PATH="$PATH:$HOME/.local/bin" | |
# install dxda | |
dxda_version=`jq -r '.dxda' scripts/bundled_dependencies.json` | |
sudo wget -O/usr/local/bin/dx-download-agent https://github.com/dnanexus/dxda/releases/download/${dxda_version}/dx-download-agent-linux | |
sudo chmod +x /usr/local/bin/dx-download-agent | |
# set up DNAnexus staging environment | |
dx login --noprojects --staging --token $AUTH_TOKEN | |
dx select dxCompiler_playground | |
# check formatting | |
sbt scalafmtCheckAll | |
# run unit tests | |
cd ${GITHUB_WORKSPACE} | |
pwd | |
sbt version && sbt compile && sbt "testOnly -- -l prod" |