-
Notifications
You must be signed in to change notification settings - Fork 8
124 lines (112 loc) · 3.64 KB
/
Copy pathvalidation.yml
File metadata and controls
124 lines (112 loc) · 3.64 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Validation
on:
workflow_call:
inputs:
coretide_repo:
type: string
description: "GitHub repository (owner/name) to clone CoreTide from"
required: false
default: OpenTideHQ/CoreTide
coretide_path:
type: string
description: "Path where CoreTide needs to be cloned into"
required: false
default: coretide
coretide_ref:
type: string
description: "Ref to clone CoreTide from"
required: false
default: development
python_version:
type: string
description: "Python version to use"
required: false
default: "3.12"
requirements_file:
type: string
description: "Requirements file path"
required: false
default: "coretide/Engines/requirements.txt"
opentide_secrets:
type: string
description: "Content of the OpenTide secrets file"
required: true
outputs:
mdr_changes:
description: "Whether MDR changes were detected"
value: ${{ jobs.CheckMDRChanges.outputs.mdr_changes }}
jobs:
CheckMDRChanges:
name: Check MDR Changes
runs-on: ubuntu-latest
outputs:
mdr_changes: ${{ steps.detect_mdr_changes.outputs.mdr_changes }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 100
ref: ${{ github.ref }}
- name: Checkout CoreTide
uses: actions/checkout@v4
with:
repository: ${{ inputs.coretide_repo }}
path: ${{ inputs.coretide_path }}
ref: refs/heads/${{ inputs.coretide_ref }}
- uses: ./coretide/Pipelines/GitHub/check-mdr-changes
name: Check MDR Changes
id: detect_mdr_changes
SchemaValidation:
name: OpenTide Schema Validation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.ref }}
- name: Checkout CoreTide
uses: actions/checkout@v4
with:
repository: ${{ inputs.coretide_repo }}
path: ${{ inputs.coretide_path }}
ref: refs/heads/${{ inputs.coretide_ref }}
- uses: ./coretide/Pipelines/GitHub/tide-setup
name: Tide Setup
id: tide_setup
with:
python_version: ${{ inputs.python_version }}
requirements_file: ${{ inputs.requirements_file }}
opentide_secrets: ${{ inputs.opentide_secrets }}
- uses: ./coretide/Pipelines/GitHub/validation-schema
name: Run OpenTide Object Validation
id: object_validation
QueryValidation:
name: OpenTide Query Validation
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && needs.CheckMDRChanges.outputs.mdr_changes == 'true'}}
needs: CheckMDRChanges
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 100
ref: ${{ github.ref }}
- name: Checkout CoreTide
uses: actions/checkout@v4
with:
repository: ${{ inputs.coretide_repo }}
path: ${{ inputs.coretide_path }}
ref: refs/heads/${{ inputs.coretide_ref }}
- uses: ./coretide/Pipelines/GitHub/tide-setup
name: Tide Setup
id: tide_setup
with:
python_version: ${{ inputs.python_version }}
requirements_file: ${{ inputs.requirements_file }}
opentide_secrets: ${{ inputs.opentide_secrets }}
- uses: ./coretide/Pipelines/GitHub/validation-query
name: Run OpenTide Query Validation
id: query_validation
with:
deployment_plan: STAGING