Skip to content

Update SDK

Update SDK #196

name: Build and test develop branch
# Trigger the workflow on merge to the develop branch
on:
push:
branches: [main, master, develop]
jobs:
# This workflow contains a single job called "build"
build-and-test-develop-branch:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 45
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set env variable BRANCH_FOR_SLACK for Slack message
run: |
echo "BRANCH_FOR_SLACK=${{ github.ref }}" >> $GITHUB_ENV
- name: Run tests
env:
FBN_TOKEN_URL: ${{ secrets.DEVELOP_FBN_TOKEN_URL }}
FBN_USERNAME: ${{ secrets.DEVELOP_FBN_USERNAME }}
FBN_PASSWORD: ${{ secrets.DEVELOP_FBN_PASSWORD }}
FBN_CLIENT_ID: ${{ secrets.DEVELOP_FBN_CLIENT_ID }}
FBN_CLIENT_SECRET: ${{ secrets.DEVELOP_FBN_CLIENT_SECRET }}
FBN_LUSID_API_URL: ${{ secrets.DEVELOP_FBN_LUSID_API_URL }}
FBN_APP_NAME: ${{ secrets.DEVELOP_FBN_CLIENT_ID }}
FBN_ACCESS_TOKEN: ${{ secrets.DEVELOP_FBN_ACCESS_TOKEN }}
FBN_LUSID_ACCESS_TOKEN: ${{ secrets.DEVELOP_FBN_ACCESS_TOKEN }}
FBN_BASE_API_URL: ${{ secrets.DEVELOP_FBN_BASE_API_URL }}
run: |
echo "env variables for DEVELOP have been set"
echo "Changing directory into sdk directory"
cd sdk
echo "Running the tests..."
docker-compose up --abort-on-container-exit
echo "Tests COMPLETED"
- name: Slack notification
uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
username: 'github-actions-tests',
icon_emoji: ':octocat:',
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_WORKFLOW} (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@${process.env.BRANCH_FOR_SLACK} by ${process.env.GITHUB_ACTOR} failed in ${process.env.AS_TOOK}`
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
if: failure()