Skip to content

Commit 5ec856f

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/add-lb-pn-resource
# Conflicts: # internal/services/baremetal/testdata/server-with-ipam-private-network.cassette.yaml
2 parents 43e9ed5 + e9e8231 commit 5ec856f

File tree

792 files changed

+281461
-569219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

792 files changed

+281461
-569219
lines changed

.github/codecov.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
component_management:
2+
default_rules: # default rules that will be inherited by all components
3+
statuses:
4+
- type: project # in this case every component that doens't have a status defined will have a project type one
5+
target: auto
6+
branches:
7+
- "!main"
8+
individual_components:
9+
- component_id: account
10+
name: account
11+
paths:
12+
- internal/services/account/**
13+
- component_id: applesilicon
14+
name: applesilicon
15+
paths:
16+
- internal/services/applesilicon/**
17+
- component_id: autoscaling
18+
name: autoscaling
19+
paths:
20+
- internal/services/autoscaling/**
21+
- component_id: az
22+
name: az
23+
paths:
24+
- internal/services/az/**
25+
- component_id: baremetal
26+
name: baremetal
27+
paths:
28+
- internal/services/baremetal/**
29+
- component_id: billing
30+
name: billing
31+
paths:
32+
- internal/services/billing/**
33+
- component_id: block
34+
name: block
35+
paths:
36+
- internal/services/block/**
37+
- component_id: cockpit
38+
name: cockpit
39+
paths:
40+
- internal/services/cockpit/**
41+
- component_id: container
42+
name: container
43+
paths:
44+
- internal/services/container/**
45+
- component_id: domain
46+
name: domain
47+
paths:
48+
- internal/services/domain/**
49+
- component_id: edgeservices
50+
name: edgeservices
51+
paths:
52+
- internal/services/edgeservices/**
53+
- component_id: file
54+
name: file
55+
paths:
56+
- internal/services/file/**
57+
- component_id: flexibleip
58+
name: flexibleip
59+
paths:
60+
- internal/services/flexibleip/**
61+
- component_id: function
62+
name: function
63+
paths:
64+
- internal/services/function/**
65+
- component_id: iam
66+
name: iam
67+
paths:
68+
- internal/services/iam/**
69+
- component_id: inference
70+
name: inference
71+
paths:
72+
- internal/services/inference/**
73+
- component_id: instance
74+
name: instance
75+
paths:
76+
- internal/services/instance/**
77+
- component_id: iot
78+
name: iot
79+
paths:
80+
- internal/services/iot/**
81+
- component_id: ipam
82+
name: ipam
83+
paths:
84+
- internal/services/ipam/**
85+
- component_id: jobs
86+
name: jobs
87+
paths:
88+
- internal/services/jobs/**
89+
- component_id: k8s
90+
name: k8s
91+
paths:
92+
- internal/services/k8s/**
93+
- component_id: keymanager
94+
name: keymanager
95+
paths:
96+
- internal/services/keymanager/**
97+
- component_id: lb
98+
name: lb
99+
paths:
100+
- internal/services/lb/**
101+
- component_id: marketplace
102+
name: marketplace
103+
paths:
104+
- internal/services/marketplace/**
105+
- component_id: mnq
106+
name: mnq
107+
paths:
108+
- internal/services/mnq/**
109+
- component_id: mongodb
110+
name: mongodb
111+
paths:
112+
- internal/services/mongodb/**
113+
- component_id: object
114+
name: object
115+
paths:
116+
- internal/services/object/**
117+
- component_id: rdb
118+
name: rdb
119+
paths:
120+
- internal/services/rdb/**
121+
- component_id: redis
122+
name: redis
123+
paths:
124+
- internal/services/redis/**
125+
- component_id: registry
126+
name: registry
127+
paths:
128+
- internal/services/registry/**
129+
- component_id: scwconfig
130+
name: scwconfig
131+
paths:
132+
- internal/services/scwconfig/**
133+
- component_id: sdb
134+
name: sdb
135+
paths:
136+
- internal/services/sdb/**
137+
- component_id: secret
138+
name: secret
139+
paths:
140+
- internal/services/secret/**
141+
- component_id: tem
142+
name: tem
143+
paths:
144+
- internal/services/tem/**
145+
- component_id: vpc
146+
name: vpc
147+
paths:
148+
- internal/services/vpc/**
149+
- component_id: vpcgw
150+
name: vpcgw
151+
paths:
152+
- internal/services/vpcgw/**
153+
- component_id: webhosting
154+
name: webhosting
155+
paths:
156+
- internal/services/webhosting/**

.github/workflows/acceptance-tests.yaml

Lines changed: 144 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
merge_group:
99

1010
jobs:
11-
tests:
11+
terraform:
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -21,6 +21,7 @@ jobs:
2121
- block
2222
- cockpit
2323
- container
24+
- datawarehouse
2425
- domain
2526
- file
2627
- flexibleip
@@ -54,9 +55,9 @@ jobs:
5455
- name: Install Terraform
5556
uses: hashicorp/setup-terraform@v3
5657
- name: Install Go
57-
uses: actions/setup-go@v5
58+
uses: actions/setup-go@v6
5859
with:
59-
go-version: 1.24.0
60+
go-version: stable
6061
# This CI supports skipping flaky or broken tests via GitHub repository variables.
6162
# This allows quick fixes without code changes when tests break due to external factors.
6263
#
@@ -149,9 +150,9 @@ jobs:
149150
- name: Checkout
150151
uses: actions/checkout@v5
151152
- name: Install Go
152-
uses: actions/setup-go@v5
153+
uses: actions/setup-go@v6
153154
with:
154-
go-version: 1.24.0
155+
go-version: stable
155156
- name: Install Terraform
156157
uses: hashicorp/setup-terraform@v3
157158
- name: Run scwconfig tests
@@ -164,3 +165,141 @@ jobs:
164165
TF_TEST_DOMAIN_ZONE: tf
165166
SCW_DEBUG: 0
166167
SCW_ENABLE_BETA: true
168+
opentofu:
169+
strategy:
170+
fail-fast: false
171+
matrix:
172+
products:
173+
- account
174+
- applesilicon
175+
- az
176+
- baremetal
177+
- billing
178+
- block
179+
- cockpit
180+
- container
181+
- datawarehouse
182+
- domain
183+
- file
184+
- flexibleip
185+
- function
186+
- iam
187+
- instance
188+
- inference
189+
- iot
190+
- ipam
191+
- jobs
192+
- k8s
193+
- lb
194+
- marketplace
195+
- mnq
196+
- mongodb
197+
- object
198+
- rdb
199+
- redis
200+
- registry
201+
- sdb
202+
- secret
203+
- tem
204+
- vpc
205+
- vpcgw
206+
- webhosting
207+
runs-on: ubuntu-latest
208+
steps:
209+
# Checkout should always be before setup-go to ensure caching is working
210+
- name: Checkout
211+
uses: actions/checkout@v5
212+
- name: Install OpenTofu
213+
uses: opentofu/setup-opentofu@v1
214+
with:
215+
tofu_version: '1.11.0-beta1'
216+
- name: Install Go
217+
uses: actions/setup-go@v6
218+
with:
219+
go-version: stable
220+
# This CI supports skipping flaky or broken tests via GitHub repository variables.
221+
# This allows quick fixes without code changes when tests break due to external factors.
222+
#
223+
# HOW TO SKIP TESTS:
224+
# 1. Go to: Settings → Secrets and variables → Actions → Variables
225+
# 2. Create or edit Repository variables:
226+
# - SKIP_TESTS_<PRODUCT>: Skip patterns for any product (uppercase)
227+
# - SKIP_TESTS_ALL: Skip patterns applied to ALL products
228+
#
229+
# PATTERN SYNTAX:
230+
# - Single test: TestAccServer_Basic
231+
# - Multiple tests: TestAccServer_Basic|TestAccServer_Other
232+
# - Wildcard: TestAccServer.*
233+
# - Contains: .*IPAM.*
234+
#
235+
# EXAMPLE:
236+
# Variable: SKIP_TESTS_BAREMETAL
237+
# Value: TestAccServer_Basic|TestAccServer_WithIPAMPrivateNetwork
238+
- name: Determine Skip Pattern
239+
id: skip-config
240+
run: |
241+
PRODUCT="${{ matrix.products }}"
242+
SKIP_PATTERN=""
243+
244+
case "$PRODUCT" in
245+
baremetal)
246+
SKIP_PATTERN="$SKIP_TESTS_BAREMETAL"
247+
;;
248+
esac
249+
250+
if [ -n "$SKIP_TESTS_ALL" ]; then
251+
if [ -n "$SKIP_PATTERN" ]; then
252+
SKIP_PATTERN="${SKIP_PATTERN}|${SKIP_TESTS_ALL}"
253+
else
254+
SKIP_PATTERN="$SKIP_TESTS_ALL"
255+
fi
256+
fi
257+
258+
echo "skip_pattern=$SKIP_PATTERN" >> $GITHUB_OUTPUT
259+
env:
260+
SKIP_TESTS_BAREMETAL: ${{ vars.SKIP_TESTS_BAREMETAL }}
261+
SKIP_TESTS_ALL: ${{ vars.SKIP_TESTS_ALL }}
262+
- name: Run Acceptance Tests
263+
run: |
264+
SKIP_PATTERN="${{ steps.skip-config.outputs.skip_pattern }}"
265+
266+
if [ -n "$SKIP_PATTERN" ]; then
267+
echo ""
268+
echo "SKIPPING TESTS"
269+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
270+
echo "Pattern: $SKIP_PATTERN"
271+
echo ""
272+
echo "Tests that will be skipped:"
273+
go tool gotestsum --format github-actions -- -list=. ./internal/services/${{ matrix.products }} | grep -E "$SKIP_PATTERN" || true
274+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
275+
echo ""
276+
277+
go tool gotestsum --format github-actions -- -v ./internal/services/${{ matrix.products }} -timeout=2h -skip="$SKIP_PATTERN"
278+
TEST_RESULT=$?
279+
else
280+
go tool gotestsum --format github-actions -- -v ./internal/services/${{ matrix.products }} -timeout=2h
281+
TEST_RESULT=$?
282+
fi
283+
284+
if [ -n "$SKIP_PATTERN" ]; then
285+
echo ""
286+
echo "CI Skip Configuration:"
287+
echo "Pattern: $SKIP_PATTERN"
288+
echo "To modify: Update SKIP_TESTS_$(echo ${{ matrix.products }} | tr '[:lower:]' '[:upper:]') in GitHub repository variables"
289+
fi
290+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
291+
292+
exit $TEST_RESULT
293+
env:
294+
TF_ACC_TERRAFORM_PATH: ${{ env.TOFU_CLI_PATH }}/tofu
295+
TF_ACC_PROVIDER_NAMESPACE: hashicorp
296+
TF_ACC_PROVIDER_HOST: registry.opentofu.org
297+
TF_ACC: 1
298+
TF_UPDATE_CASSETTES: false
299+
TF_TEST_DOMAIN: scaleway-terraform.com
300+
TF_TEST_DOMAIN_ZONE: tf
301+
SCW_DEBUG: 0
302+
SCW_ACCESS_KEY: "SCWXXXXXXXXXXXXXFAKE"
303+
SCW_SECRET_KEY: "11111111-1111-1111-1111-111111111111"
304+
SCW_ENABLE_BETA: true
305+
TF_ACC_LOG: trace

.github/workflows/actionlint.yml

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

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v3
51+
uses: github/codeql-action/init@v4
5252
with:
5353
languages: ${{ matrix.language }}
5454
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -59,7 +59,7 @@ jobs:
5959
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6060
# If this step fails, then you should remove it and run the build manually (see below)
6161
- name: Autobuild
62-
uses: github/codeql-action/autobuild@v3
62+
uses: github/codeql-action/autobuild@v4
6363

6464
# ℹ️ Command-line programs to run using the OS shell.
6565
# 📚 https://git.io/JvXDl
@@ -73,4 +73,4 @@ jobs:
7373
# make release
7474

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v3
76+
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)