Skip to content

Commit a57a5e8

Browse files
authored
Merge branch 'master' into feat/cookbook-db-migration
2 parents 657d24d + 8744886 commit a57a5e8

File tree

382 files changed

+46267
-236847
lines changed

Some content is hidden

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

382 files changed

+46267
-236847
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/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-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 ...]

β€Žcmd/scw/testdata/test-all-usage-function-domain-create-usage.goldenβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USAGE:
66
scw function domain create [arg=value ...]
77

88
ARGS:
9-
[hostname] Hostame to create
9+
[hostname] Hostname to create
1010
[function-id] UUID of the function to associate the domain with
1111
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1212

β€Žcmd/scw/testdata/test-all-usage-iam-policy-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-
Retrieve information about a policy, speficified by the `policy_id` parameter. The policy's full details, including `id`, `name`, `organization_id`, `nb_rules` and `nb_scopes`, `nb_permission_sets` are returned in the response.
3+
Retrieve information about a policy, specified by the `policy_id` parameter. The policy's full details, including `id`, `name`, `organization_id`, `nb_rules` and `nb_scopes`, `nb_permission_sets` are returned in the response.
44

55
USAGE:
66
scw iam policy get <policy-id ...> [arg=value ...]

0 commit comments

Comments
Β (0)