Skip to content

Commit 68b089c

Browse files
committed
add data plane to automation
1 parent 6aec33c commit 68b089c

2 files changed

Lines changed: 52 additions & 11 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Verify All Resource Manager Services can be Imported and Generated
3+
on:
4+
pull_request:
5+
types: ['opened', 'synchronize']
6+
paths:
7+
- '.github/workflows/unit-test-end-to-end-data-plane.yaml'
8+
- 'config/data-plane.hcl'
9+
- 'tools/generator-go-sdk/**'
10+
- 'tools/importer-rest-api-specs/**'
11+
12+
jobs:
13+
test:
14+
runs-on: custom-linux-xl
15+
steps:
16+
- name: mount a ramdisk to working dir
17+
run: |
18+
sudo mount -t tmpfs -o size=32G tmpfs $GITHUB_WORKSPACE
19+
20+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
21+
with:
22+
submodules: recursive
23+
24+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
25+
with:
26+
go-version-file: ./.go-version
27+
28+
- name: "Build and Run importer-rest-api-specs"
29+
id: import-data
30+
run: |
31+
cd ./tools/importer-rest-api-specs
32+
make tools
33+
make build
34+
make import-data-plane
35+
36+
- name: "Run the Go SDK Generator"
37+
run: |
38+
./scripts/automation-generate-go-sdk.sh data-plane

scripts/automation-generate-and-commit-go-sdk.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ function buildAndInstallDependencies {
1111
echo "Outputting Go Version.."
1212
go version
1313

14-
echo "Installing the Data API V2 onto the GOBIN.."
14+
echo "Installing the Data API V2 onto the GOBIN"
1515
cd "${DIR}/tools/data-api"
1616
go install .
1717
cd "${DIR}"
1818

19-
echo "Installing the Go SDK Generator into the GOBIN.."
19+
echo "Installing the Go SDK Generator into the GOBIN"
2020
cd "${DIR}/tools/generator-go-sdk"
2121
go install .
2222
cd "${DIR}"
@@ -31,40 +31,43 @@ function runWrapper {
3131
local apiDefinitionsDirectory=$1
3232
local outputDirectory=$2
3333

34-
echo "Running Wrapper for Resource Manager.."
34+
echo "Running Wrapper for Resource Manager"
3535
cd "${DIR}/tools/wrapper-automation"
3636
./wrapper-automation resource-manager go-sdk \
3737
--api-definitions-dir="../../$apiDefinitionsDirectory"\
3838
--output-dir="../../$outputDirectory"
3939

40-
echo "Running Wrapper for Microsoft Graph.."
40+
echo "Running Wrapper for Data Plane"
41+
cd "${DIR}/tools/wrapper-automation"
42+
./wrapper-automation microsoft-graph go-sdk \
43+
--api-definitions-dir="../../$apiDefinitionsDirectory"\
44+
--output-dir="../../$outputDirectory"
45+
46+
echo "Running Wrapper for Microsoft Graph"
4147
cd "${DIR}/tools/wrapper-automation"
4248
./wrapper-automation microsoft-graph go-sdk \
4349
--api-definitions-dir="../../$apiDefinitionsDirectory"\
4450
--output-dir="../../$outputDirectory"
4551

4652
cd "${DIR}"
4753

48-
echo "Running 'make tools' within the SDK codebase.."
54+
echo "Running 'make tools' within the SDK codebase"
4955
cd "${outputDirectory}"
5056
make tools
5157

52-
echo "Running 'make fmt' on the generated code.."
53-
make fmt
54-
55-
echo "Running 'make imports' on the generated code.."
58+
echo "Running 'make imports' on the generated code"
5659
make imports
5760
}
5861

5962
function prepareGoSdk {
6063
local workingDirectory=$1
6164
local sdkRepo=$2
6265

63-
echo "Removing any existing working directory.."
66+
echo "Removing any existing working directory"
6467
cd "${DIR}"
6568
rm -rf "$workingDirectory"
6669

67-
echo "Cloning SDK Repository into $workingDirectory.."
70+
echo "Cloning SDK Repository into $workingDirectory"
6871
git clone "$sdkRepo" "$workingDirectory"
6972

7073
echo "Preparing the repository for generation"

0 commit comments

Comments
 (0)