-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (45 loc) · 1.5 KB
/
dry_generation.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: Dry-Generation with Serializers
on:
workflow_dispatch:
pull_request:
types: ["opened", "edited", "reopened", "synchronize"]
branches: [main]
jobs:
dry_generation:
runs-on: ubuntu-latest
steps:
- name: Clone 'eagletrt/telemetry-serializers'
uses: actions/checkout@v4
with:
repository: '${{ github.repository }}'
- name: Clone 'eagletrt/serializers'
uses: actions/checkout@v4
with:
repository: 'eagletrt/serializers'
path: serializers
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python requirements
run: 'pip install -r serializers/requirements.txt'
- name: Set up Go
uses: actions/setup-go@v4
- name: Print go envs
run: go env
- name: Install 'protoc'
run: |
DEBIAN_FRONTEND=noninteractive
sudo apt update
sudo apt install -y protobuf-compiler
- name: Install protoc 'json-schema' extension
run: |
go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest
- name: Run Serializers files generation
working-directory: serializers
run: |
python3 src/generator/main.py ../proto /tmp/generated
- name: Run JSON Schema files generation
run: |
./serializers/scripts/generate_schemas /tmp/generated/proto /tmp/generated