Skip to content

Commit d99128e

Browse files
committed
fix(ci): install go sdk dependencies before linting
1 parent 9341e4b commit d99128e

6 files changed

Lines changed: 95 additions & 83 deletions

File tree

.github/actions/build/go/action.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/actions/build/python/action.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/actions/generate-sdk/go/action.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/actions/generate-sdk/python/action.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,27 @@ jobs:
2020
with:
2121
distribution: "temurin"
2222
java-version: ${{ env.JAVA_VERSION }}
23+
2324
- name: Checkout
2425
uses: actions/checkout@v4
25-
- name: Build
26-
uses: ./.github/actions/build/go
27-
with:
28-
go-version: ${{ env.GO_VERSION_BUILD }}
29-
- name: Generate SDK
30-
uses: ./.github/actions/generate-sdk/go
31-
- name: Install Go ${{ matrix.go-version }}
26+
27+
- name: Install Go
3228
uses: actions/setup-go@v5
3329
with:
3430
go-version: ${{ matrix.go-version }}
31+
32+
- name: Install project tools and dependencies
33+
shell: bash
34+
run: make project-tools
35+
36+
- name: Download OAS
37+
shell: bash
38+
run: make download-oas
39+
40+
- name: Generate SDK
41+
shell: bash
42+
run: make generate-go-sdk
43+
3544
- name: Test
3645
working-directory: ./sdk-repo-updated
3746
run: make test skip-non-generated-files=true
@@ -48,21 +57,35 @@ jobs:
4857
with:
4958
distribution: "temurin"
5059
java-version: ${{ env.JAVA_VERSION }}
60+
5161
- name: Checkout
5262
uses: actions/checkout@v4
53-
- name: Build
54-
uses: ./.github/actions/build/go
55-
with:
56-
go-version: ${{ env.GO_VERSION_BUILD }}
57-
- name: Generate SDK
58-
uses: ./.github/actions/generate-sdk/go
59-
- name: Install Go ${{ env.GO_VERSION_BUILD }}
63+
64+
- name: Install Go
6065
uses: actions/setup-go@v5
6166
with:
6267
go-version: ${{ env.GO_VERSION_BUILD }}
68+
69+
- name: Install project tools and dependencies
70+
shell: bash
71+
run: make project-tools
72+
73+
- name: Download OAS
74+
shell: bash
75+
run: make download-oas
76+
77+
- name: Generate SDK
78+
shell: bash
79+
run: make generate-go-sdk
80+
6381
- name: Remove waiters
6482
working-directory: ./sdk-repo-updated
6583
run: rm -r services/*/wait
84+
85+
- name: Install SDK project tools and dependencies
86+
working-directory: ./sdk-repo-updated
87+
run: make project-tools
88+
6689
- name: Lint
6790
working-directory: ./sdk-repo-updated
6891
run: make lint skip-non-generated-files=true
@@ -80,29 +103,37 @@ jobs:
80103
with:
81104
distribution: "temurin"
82105
java-version: ${{ env.JAVA_VERSION }}
106+
83107
- name: Checkout
84108
uses: actions/checkout@v4
109+
85110
- name: install uv
86111
uses: astral-sh/setup-uv@v7
87112
with:
88113
version: "0.10.4"
114+
89115
- name: Build
90116
uses: ./.github/actions/build/python
117+
91118
- name: Generate SDK
92119
uses: ./.github/actions/generate-sdk/python
93120
with:
94121
python-version: ${{ matrix.python-version }}
122+
95123
- name: install uv
96124
uses: astral-sh/setup-uv@v7
97125
with:
98126
version: "0.10.4"
99127
python-version: ${{ matrix.python-version }}
100-
- name: Install sdk
128+
129+
- name: Install SDK
101130
working-directory: ./sdk-repo-updated
102131
run: make install-dev
132+
103133
- name: Lint
104134
working-directory: ./sdk-repo-updated
105135
run: make lint
136+
106137
- name: Test
107138
working-directory: ./sdk-repo-updated
108139
run: make test
@@ -119,17 +150,20 @@ jobs:
119150
with:
120151
distribution: "temurin"
121152
java-version: ${{ matrix.java-version }}
153+
122154
- name: Checkout
123155
uses: actions/checkout@v5
156+
124157
- name: Download OAS
125158
run: make download-oas
159+
126160
- name: Generate SDK
127-
run: make generate-sdk
128-
env:
129-
LANGUAGE: java
161+
run: make generate-java-sdk
162+
130163
- name: Lint
131164
working-directory: ./sdk-repo-updated
132165
run: make lint
166+
133167
- name: Test
134168
working-directory: ./sdk-repo-updated
135169
run: make test

.github/workflows/sdk-pr.yaml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
env:
10-
GO_VERSION: "1.22"
10+
GO_VERSION: "1.25"
1111
JAVA_VERSION: "25"
1212

1313
jobs:
@@ -23,25 +23,40 @@ jobs:
2323
with:
2424
key: ${{ secrets.SSH_PRIVATE_KEY }}
2525
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
26+
2627
- name: Install Java
2728
uses: actions/setup-java@v4
2829
with:
2930
distribution: "temurin"
3031
java-version: ${{ env.JAVA_VERSION }}
32+
3133
- name: Checkout
3234
uses: actions/checkout@v4
33-
- name: Build
34-
uses: ./.github/actions/build/go
35+
36+
- name: Install Go
37+
uses: actions/setup-go@v5
3538
with:
3639
go-version: ${{ env.GO_VERSION }}
40+
41+
- name: Install project tools and dependencies
42+
shell: bash
43+
run: make project-tools
44+
45+
- name: Download OAS
46+
shell: bash
47+
run: make download-oas
48+
3749
- name: Generate SDK
38-
uses: ./.github/actions/generate-sdk/go
50+
shell: bash
51+
run: make generate-sdk
52+
3953
- name: Push SDK
4054
env:
4155
GH_REPO: "stackitcloud/stackit-sdk-go"
4256
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
4357
run: |
4458
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
59+
4560
main-python:
4661
name: "[Python] Update SDK Repo"
4762
runs-on: ubuntu-latest
@@ -54,21 +69,37 @@ jobs:
5469
with:
5570
key: ${{ secrets.SSH_PRIVATE_KEY }}
5671
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
72+
5773
- name: Install Java
5874
uses: actions/setup-java@v4
5975
with:
6076
distribution: "temurin"
6177
java-version: ${{ env.JAVA_VERSION }}
78+
6279
- name: Checkout
6380
uses: actions/checkout@v4
64-
- name: Build
65-
uses: ./.github/actions/build/python
81+
82+
- name: Install project tools and dependencies
83+
shell: bash
84+
run: |
85+
python -m venv .venv
86+
. .venv/bin/activate
87+
python -m pip install --upgrade pip
88+
make project-tools LANGUAGE=python
89+
6690
- name: install uv
6791
uses: astral-sh/setup-uv@v7
6892
with:
6993
version: "0.10.4"
94+
95+
- name: Download OAS
96+
shell: bash
97+
run: make download-oas
98+
7099
- name: Generate SDK
71-
uses: ./.github/actions/generate-sdk/python
100+
shell: bash
101+
run: make generate-sdk LANGUAGE=python
102+
72103
- name: Push SDK
73104
env:
74105
GH_REPO: "stackitcloud/stackit-sdk-python"
@@ -89,19 +120,24 @@ jobs:
89120
with:
90121
key: ${{ secrets.SSH_PRIVATE_KEY }}
91122
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
123+
92124
- name: Install Java
93125
uses: actions/setup-java@v4
94126
with:
95127
distribution: "temurin"
96128
java-version: ${{ env.JAVA_VERSION }}
129+
97130
- name: Checkout
98131
uses: actions/checkout@v5
132+
99133
- name: Download OAS
100134
run: make download-oas
135+
101136
- name: Generate SDK
102137
run: make generate-sdk
103138
env:
104139
LANGUAGE: java
140+
105141
- name: Push SDK
106142
env:
107143
GH_REPO: "stackitcloud/stackit-sdk-java"

0 commit comments

Comments
 (0)