Skip to content

Commit c88a28f

Browse files
authored
Merge branch 'master' into feat/cookbook-restore-backup-cross-instance
2 parents 214ec28 + 8744886 commit c88a28f

File tree

393 files changed

+49001
-231105
lines changed

Some content is hidden

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

393 files changed

+49001
-231105
lines changed

β€Ž.github/workflows/unit-tests.yamlβ€Ž renamed to β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Build
22

33
permissions:
44
contents: read
@@ -8,16 +8,9 @@ on:
88
merge_group:
99

1010
jobs:
11-
os-tests:
12-
strategy:
13-
matrix:
14-
platform: [ubuntu-latest, macos-latest, windows-latest]
15-
runs-on: ${{ matrix.platform }}
11+
native-binary:
12+
runs-on: ubuntu-latest
1613
steps:
17-
- name: Set git to use LF to avoid problem with goldens on windows
18-
run: |
19-
git config --global core.autocrlf false
20-
git config --global core.eol lf
2114
# Checkout should always be before setup-go to ensure caching is working
2215
- name: Checkout
2316
uses: actions/checkout@v5
@@ -31,31 +24,14 @@ jobs:
3124
run: |
3225
go mod tidy
3326
git diff --exit-code
34-
- name: Run unit tests
35-
run: go tool gotestsum --format github-actions
36-
- name: Execute main binary # Test the runtime for potential panics.
37-
run: go run cmd/scw/main.go -h
38-
39-
build-tests:
40-
runs-on: ubuntu-latest
41-
steps:
42-
# Checkout should always be before setup-go to ensure caching is working
43-
- name: Checkout
44-
uses: actions/checkout@v5
45-
with:
46-
fetch-depth: 1
47-
- name: Install Go
48-
uses: actions/setup-go@v6
49-
with:
50-
go-version: stable
5127
- name: Build binaries
5228
run: ./scripts/build.sh
5329
- name: Print binaries size
5430
run: ls -lh ./bin
5531
- name: Check binary size
5632
run: ./scripts/check-size.sh ./bin/*linux-x86_64
5733

58-
docker-tests:
34+
docker:
5935
runs-on: ubuntu-latest
6036
steps:
6137
- name: Checkout

β€Ž.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

β€Ž.github/workflows/lint.ymlβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,14 @@ jobs:
3737
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
3838
version: latest
3939
args: --timeout 10m
40+
41+
spelling:
42+
name: Spell Check with Typos
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout Actions Repository
46+
uses: actions/checkout@v4
47+
- name: Spell Check Repo
48+
uses: crate-ci/[email protected]
49+
env:
50+
CLICOLOR: 1

β€Ž.github/workflows/tests.ymlβ€Ž

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
merge_group:
9+
10+
jobs:
11+
namespaces:
12+
strategy:
13+
matrix:
14+
platform:
15+
- ubuntu-latest
16+
- macos-latest
17+
- windows-latest
18+
products:
19+
- account
20+
- applesilicon
21+
- baremetal
22+
- billing
23+
- block
24+
- cockpit
25+
- container
26+
- dedibox
27+
- domain
28+
- edge_services
29+
- flexibleip
30+
- function
31+
- iam
32+
- inference
33+
- init
34+
- instance
35+
- iot
36+
- ipam
37+
- jobs
38+
- k8s
39+
- key_manager
40+
- lb
41+
- login
42+
- marketplace
43+
- mnq
44+
- mongodb
45+
- object
46+
- rdb
47+
- redis
48+
- registry
49+
- serverless_sqldb
50+
- secret
51+
- tem
52+
- vpc
53+
- vpcgw
54+
- webhosting
55+
runs-on: ${{ matrix.platform }}
56+
steps:
57+
- name: Set git to use LF to avoid problem with goldens on windows
58+
run: |
59+
git config --global core.autocrlf false
60+
git config --global core.eol lf
61+
# Checkout should always be before setup-go to ensure caching is working
62+
- name: Checkout
63+
uses: actions/checkout@v5
64+
with:
65+
fetch-depth: 1
66+
- name: Install Go
67+
uses: actions/setup-go@v6
68+
with:
69+
go-version: stable
70+
- name: Run tests
71+
run: go tool gotestsum --format github-actions -- -v ./internal/namespaces/${{ matrix.products }}/...
72+
- name: Execute main binary # Test the runtime for potential panics.
73+
run: go run cmd/scw/main.go -h
74+
others:
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v5
79+
with:
80+
fetch-depth: 1
81+
- name: Install Go
82+
uses: actions/setup-go@v6
83+
with:
84+
go-version: stable
85+
- name: Run tests outside of products namespaces
86+
run: go list ./... | grep -v 'internal/namespaces' | xargs go tool gotestsum --format github-actions -- -v

β€Ž_typos.tomlβ€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[files]
2+
extend-exclude = [
3+
"**.cassette.yaml",
4+
"**.golden",
5+
"go.mod",
6+
"go.sum",
7+
"CHANGELOG.md"
8+
]
9+
10+
[default.extend-words]
11+
pn = "pn"
12+
thi = "thi"
13+
Vertexes = "Vertexes"
14+
ba = "ba"
15+
Viw = "Viw"
16+
UE = "UE"

β€Žcmd/scw/testdata/test-all-usage-apple-silicon-server-reinstall-usage.goldenβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️
3-
Reinstall an existing Apple silicon server (specified by its server ID) from a new image (OS). All the data on the disk is deleted and all configuration is reset to the defailt configuration values of the image (OS).
3+
Reinstall an existing Apple silicon server (specified by its server ID) from a new image (OS). All the data on the disk is deleted and all configuration is reset to the default configuration values of the image (OS).
44

55
USAGE:
66
scw apple-silicon server reinstall <server-id ...> [arg=value ...]

β€Žcmd/scw/testdata/test-all-usage-audit-trail-event-list-usage.goldenβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
ARGS:
99
[project-id] (Optional) ID of the Project containing the Audit Trail events
10-
[resource-type] (Optional) Type of the Scaleway resource (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key | iam_rule | iam_saml | iam_saml_certificate | secret_manager_secret | secret_manager_version | key_manager_key | account_user | account_organization | account_project | instance_server | instance_placement_group | instance_security_group | instance_volume | instance_snapshot | instance_image | apple_silicon_server | baremetal_server | baremetal_setting | ipam_ip | sbs_volume | sbs_snapshot | load_balancer_lb | load_balancer_ip | load_balancer_frontend | load_balancer_backend | load_balancer_route | load_balancer_acl | load_balancer_certificate | sfs_filesystem | vpc_private_network)
10+
[resource-type] (Optional) Type of the Scaleway resource (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key | iam_rule | iam_saml | iam_saml_certificate | secret_manager_secret | secret_manager_version | key_manager_key | account_user | account_organization | account_project | instance_server | instance_placement_group | instance_security_group | instance_volume | instance_snapshot | instance_image | apple_silicon_server | baremetal_server | baremetal_setting | ipam_ip | sbs_volume | sbs_snapshot | load_balancer_lb | load_balancer_ip | load_balancer_frontend | load_balancer_backend | load_balancer_route | load_balancer_acl | load_balancer_certificate | sfs_filesystem | vpc_private_network | edge_services_plan | edge_services_pipeline | edge_services_dns_stage | edge_services_tls_stage | edge_services_cache_stage | edge_services_route_stage | edge_services_route_rules | edge_services_waf_stage | edge_services_backend_stage)
1111
[method-name] (Optional) Name of the method of the API call performed
1212
[status] (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied
1313
[recorded-after] (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default

β€Žcmd/scw/testdata/test-all-usage-cockpit-managed-alerts-enable-usage.goldenβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️
3-
Enable the sending of managed alerts for the specified Project. Managed alerts are predefined alerts that apply to Scaleway recources integrated with Cockpit by default.
3+
Enable the sending of managed alerts for the specified Project. Managed alerts are predefined alerts that apply to Scaleway resources integrated with Cockpit by default.
44

55
USAGE:
66
scw cockpit managed-alerts enable [arg=value ...]

β€Žcmd/scw/testdata/test-all-usage-container-cron-create-usage.goldenβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
ARGS:
99
[container-id] UUID of the container to invoke by the cron
10-
[schedule] UNIX cron shedule
10+
[schedule] UNIX cron schedule
1111
[args] Arguments to pass with the cron
1212
[name] Name of the cron to create
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

β€Žcmd/scw/testdata/test-all-usage-dns-certificate-get-usage.goldenβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️
3-
Get the DNS zone's TLS certificate. If you do not have a certificate, the ouptut returns `no certificate found`.
3+
Get the DNS zone's TLS certificate. If you do not have a certificate, the output returns `no certificate found`.
44

55
USAGE:
66
scw dns certificate get <dns-zone ...> [arg=value ...]

0 commit comments

Comments
Β (0)