Thank you for your interest in contributing to this project.
You may run the following steps to set up your local environment for testing purposes.
npm init -y
npm install @actions/core @actions/githubnpm install @azure/ms-rest-nodeauthSP_NAME="actions-local-test"
SUBSCRIPTION_ID="..."
RESOURCE_GROUP_NAME="..."
STORAGE_ACCOUNT_NAME="..."az ad sp create-for-rbac --name $SP_NAME --role "Storage Blob Data Contributor" --scopes /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Storage/storageAccounts/$STORAGE_ACCOUNT_NAMEthe output of this command will be like this:
{
"appId": "...",
"displayName": "...",
"password": "...",
"tenant": "..."
}APP_ID=""az role assignment create --assignee $APP_ID --role "Storage Blob Data Contributor" --scope /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Storage/storageAccounts/$STORAGE_ACCOUNT_NAMEexport AZURE_CLIENT_ID="$APP_ID"
export AZURE_TENANT_ID="<tenant>"
export AZURE_CLIENT_SECRET="<password>"
export AZURE_STORAGE_ACCOUNT_NAME="your-storage-account-name"
export AZURE_STORAGE_CONTAINER_NAME="your-container-name"az loginaz account set --subscription <subscription id>You only need to perform the following when you update any of the data used for testing the action; otherwise, you may skip this section.
Build the dependencies of the workflows using the following command.
zip -jq ./tests/data/Dependencies.zip ./tests/data/*.wdl These environment variables defines specifies the Cromwell server and its configured directories. Set the following variables based on your Cromwell configuration.
export INPUT_AZURE_STORAGE_ACCOUNT_NAME="..." # e.g., cromwell0123456789
export INPUT_AZURE_STORAGE_CONTAINER_NAME="..." # e.g., workflows
export INPUT_AZURE_STORAGE_INPUTS_CONTAINER_NAME="..." # e.g., tests-inputs
export INPUT_AZURE_STORAGE_BLOB_NAME="..." # e.g., newHaving setup the environment, you may the following command to run the action on test data.
node tests/test.jsnpm i -g @vercel/nccnpm install- Create a Github environment named
CoA. - Follow this documentation to setup Azure Login secrets.
- Give the service principal the
Storage Blob Data Contributorrole. - Define the following environment variables.
AZURE_STORAGE_ACCOUNT_NAME
AZURE_STORAGE_CONTAINER_NAME
AZURE_STORAGE_INPUTS_CONTAINER_NAME
AZURE_STORAGE_BLOB_NAME- compile:
ncc build index.js --license licenses.txt-
git commit push:
-
git tag:
git tag -a -m "update" v1.12- push tag:
git push --follow-tags