-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (49 loc) · 1.4 KB
/
reusable_analytics.yml
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
on:
workflow_call:
inputs:
ENVIRONMENT:
required: true
type: string
DB_OVERRIDE:
required: false
type: string
default: ""
GOODDATA_SDK_CUSTOM_IMAGE:
required: true
type: string
BRANCH_NAME:
type: string
DEPLOY_GD_MODELS:
required: false
type: string
default: "true"
jobs:
reusable_analytics:
name: analytics
runs-on: ubuntu-latest
environment: ${{ inputs.ENVIRONMENT }}
container: ${{ inputs.GOODDATA_SDK_CUSTOM_IMAGE }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.BRANCH_NAME }}
- name: Setup Environment
run: |
mkdir -p ~/.gooddata
echo "${{ secrets.GOODDATA_PROFILES_FILE }}" > ~/.gooddata/profiles.yaml
- name: Deploy Analytics
shell: bash
if: ${{ inputs.DEPLOY_GD_MODELS == 'true' }}
run: |
source .env.${{ inputs.ENVIRONMENT }} ${{ inputs.DB_OVERRIDE }}
make deploy_analytics
# Test analytics even when deploy is skipped (DEPLOY_ANALYTICS=false)
# It is skipped in scheduled runs
- name: Test Analytics
shell: bash
timeout-minutes: 10
run: |
source .env.${{ inputs.ENVIRONMENT }} ${{ inputs.DB_OVERRIDE }}
make test_visualizations