-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (51 loc) · 2.16 KB
/
cron.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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()