Daily build #186
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: Daily build | |
on: | |
schedule: | |
- cron: "0 4 * * *" | |
jobs: | |
# This workflow contains a single job called "build" | |
cron-build: | |
# 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: Run tests on MASTER branch | |
if: ${{ github.ref == 'refs/heads/master'}} | |
env: | |
FBN_TOKEN_URL: ${{ secrets.MASTER_FBN_TOKEN_URL }} | |
FBN_USERNAME: ${{ secrets.MASTER_FBN_USERNAME }} | |
FBN_PASSWORD: ${{ secrets.MASTER_FBN_PASSWORD }} | |
FBN_CLIENT_ID: ${{ secrets.MASTER_FBN_CLIENT_ID }} | |
FBN_CLIENT_SECRET: ${{ secrets.MASTER_FBN_CLIENT_SECRET }} | |
FBN_LUSID_API_URL: ${{ secrets.MASTER_FBN_LUSID_API_URL }} | |
FBN_APP_NAME: ${{ secrets.MASTER_FBN_CLIENT_ID }} | |
FBN_ACCESS_TOKEN: ${{ secrets.MASTER_FBN_ACCESS_TOKEN }} | |
FBN_LUSID_ACCESS_TOKEN: ${{ secrets.MASTER_FBN_ACCESS_TOKEN }} | |
FBN_BASE_API_URL: ${{ secrets.MASTER_FBN_BASE_API_URL }} | |
run: | | |
echo "env variables for MASTER 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} on ${process.env.AS_REPO}@${process.env.GITHUB_REF} has run in ${process.env.AS_TOOK} with status ${{ job.status }}` | |
}] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
if: always() |