-
Notifications
You must be signed in to change notification settings - Fork 17
142 lines (136 loc) · 4.88 KB
/
checks.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
on:
workflow_call:
inputs:
dependency_generator_config_file_path:
description: "Location of the dependencies.yaml configuration file"
default: "dependencies.yaml"
required: false
type: string
enable_check_size:
description: "Whether to enable the size checker"
default: true
type: boolean
required: false
enable_check_style:
description: "Whether to enable the style checker"
default: true
type: boolean
required: false
enable_check_generated_files:
description: "Whether to enable the generated files checker"
default: true
type: boolean
required: false
enable_check_pr_job_dependencies:
description: "Whether to enable the PR workflow dependency checker"
default: true
type: boolean
required: false
ignored_pr_jobs:
description: "Space separated list of jobs to ignore when checking PR workflow dependencies"
default: ""
type: string
required: false
default_endpoint:
type: string
description: "Destination to send telemetry to, not including path like /v1/traces"
traceparent:
type: string
description: |
Opentelemetry traceparent. Format is described in https://medium.com/@mesutatasoy/understanding-traceparent-and-microservices-in-opentelemetry-notepad-series-7-de5c16bf6462
Generally, 00-<trace_id 32 chars>-<span_id 16 chars>-01
otel_resource_attributes:
type: string
description: |
Comma-separated key=value pairs used for storing additional "tags" to better identify data
shared_actions_repo:
type: string
description: git repo for rapidsai/shared-actions code
default: rapidsai/shared-actions
shared_actions_ref:
type: string
description: git ref of branch/tag/sha for rapidsai/shared-actions repo
default: main
defaults:
run:
shell: bash
env:
OTEL_EXPORTER_OTLP_ENDPOINT: "${{ inputs.default_endpoint }}"
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
OTEL_RESOURCE_ATTRIBUTES: ${{inputs.otel_resource_attributes}}
jobs:
other-checks:
runs-on: ubuntu-latest
container:
image: rapidsai/ci-conda:latest
env:
RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout actions
uses: actions/checkout@v4
if: always()
with:
repository: ${{inputs.shared_actions_repo}}
ref: ${{inputs.shared_actions_ref}}
path: ./shared-actions
- name: Get PR Info
id: get-pr-info
uses: nv-gha-runners/get-pr-info@main
- name: Run rapids-size-checker
if: ${{ inputs.enable_check_size }}
run: rapids-size-checker
env:
RAPIDS_BASE_BRANCH: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}
- name: Check workflow file dependencies
if: ${{ inputs.enable_check_pr_job_dependencies }}
run: rapids-check-pr-job-dependencies "${IGNORED_JOBS}"
env:
IGNORED_JOBS: ${{ inputs.ignored_pr_jobs }}
- name: Telemetry summary
id: telemetry-summary
if: always()
uses: ./shared-actions/telemetry-summarize
with:
traceparent: "${{ inputs.traceparent }}"
ca_cert: "${{secrets.OTEL_EXPORTER_OTLP_CA_CERTIFICATE}}"
client_cert: "${{secrets.OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE}}"
client_key: "${{secrets.OTEL_EXPORTER_OTLP_CLIENT_KEY}}"
check-style:
if: ${{ inputs.enable_check_style }}
runs-on: ubuntu-latest
container:
image: rapidsai/ci-conda:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout actions
uses: actions/checkout@v4
if: always()
with:
repository: ${{inputs.shared_actions_repo}}
ref: ${{inputs.shared_actions_ref}}
path: ./shared-actions
- name: Get PR Info
id: get-pr-info
uses: nv-gha-runners/get-pr-info@main
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-0|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run ci/check_style.sh
run: ci/check_style.sh
env:
RAPIDS_BASE_BRANCH: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}
- name: Telemetry summary
id: telemetry-summary
if: always()
uses: ./shared-actions/telemetry-summarize
with:
traceparent: "${{ inputs.traceparent }}"
ca_cert: "${{secrets.OTEL_EXPORTER_OTLP_CA_CERTIFICATE}}"
client_cert: "${{secrets.OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE}}"
client_key: "${{secrets.OTEL_EXPORTER_OTLP_CLIENT_KEY}}"