Skip to content

Commit 2f3bdd6

Browse files
committed
validation runners
1 parent ad16b3b commit 2f3bdd6

File tree

6 files changed

+138
-0
lines changed

6 files changed

+138
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: AWS Validation Tests
2+
3+
on:
4+
schedule:
5+
# Run daily at 2 AM UTC
6+
- cron: "0 2 * * *"
7+
workflow_dispatch:
8+
# Allow manual triggering
9+
pull_request:
10+
paths:
11+
- "v1/providers/aws/**"
12+
- "internal/validation/**"
13+
- "v1/**"
14+
branches: [main]
15+
16+
jobs:
17+
aws-validation:
18+
name: AWS Provider Validation
19+
runs-on: ubuntu-latest
20+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v4
27+
with:
28+
go-version: "1.23.0"
29+
30+
- name: Cache Go modules
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.cache/go-build
35+
~/go/pkg/mod
36+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37+
restore-keys: |
38+
${{ runner.os }}-go-
39+
40+
- name: Install dependencies
41+
run: make deps
42+
43+
- name: Run Nebius validation tests
44+
env:
45+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
46+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
47+
TEST_USER_PRIVATE_KEY_PEM_BASE64: ${{ secrets.TEST_USER_PRIVATE_KEY_PEM_BASE64 }}
48+
VALIDATION_TEST: true
49+
run: |
50+
cd v1/providers/aws
51+
go test -v -short=false -timeout=30m ./...
52+
53+
- name: Upload test results
54+
uses: actions/upload-artifact@v4
55+
if: always()
56+
with:
57+
name: aws-validation-results
58+
path: |
59+
v1/providers/aws/coverage.out
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Nebius Validation Tests
2+
3+
on:
4+
schedule:
5+
# Run daily at 2 AM UTC
6+
- cron: "0 2 * * *"
7+
workflow_dispatch:
8+
# Allow manual triggering
9+
pull_request:
10+
paths:
11+
- "v1/providers/nebius/**"
12+
- "internal/validation/**"
13+
- "v1/**"
14+
branches: [main]
15+
16+
jobs:
17+
nebius-validation:
18+
name: Nebius Provider Validation
19+
runs-on: ubuntu-latest
20+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v4
27+
with:
28+
go-version: "1.23.0"
29+
30+
- name: Cache Go modules
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.cache/go-build
35+
~/go/pkg/mod
36+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37+
restore-keys: |
38+
${{ runner.os }}-go-
39+
40+
- name: Install dependencies
41+
run: make deps
42+
43+
- name: Run Nebius validation tests
44+
env:
45+
NEBIUS_PUBLIC_KEY_ID: ${{ secrets.NEBIUS_PUBLIC_KEY_ID }}
46+
NEBIUS_PRIVATE_KEY_PEM_BASE64: ${{ secrets.NEBIUS_SERVICE_ACCOUNT_ID }}
47+
NEBIUS_SERVICE_ACCOUNT_ID: ${{ secrets.NEBIUS_SERVICE_ACCOUNT_ID }}
48+
NEBIUS_PROJECT_ID: ${{ secrets.NEBIUS_PROJECT_ID }}
49+
TEST_USER_PRIVATE_KEY_PEM_BASE64: ${{ secrets.TEST_USER_PRIVATE_KEY_PEM_BASE64 }}
50+
VALIDATION_TEST: true
51+
run: |
52+
cd v1/providers/nebius
53+
go test -v -short=false -timeout=30m ./...
54+
55+
- name: Upload test results
56+
uses: actions/upload-artifact@v4
57+
if: always()
58+
with:
59+
name: nebius-validation-results
60+
path: |
61+
v1/providers/nebius/coverage.out

v1/providers/aws/validation_kubernetes_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import (
1111
)
1212

1313
func TestAWSKubernetesValidation(t *testing.T) {
14+
if isValidationTest == "" {
15+
t.Skip("VALIDATION_TEST is not set, skipping AWS Kubernetes validation tests")
16+
}
17+
1418
testUserPrivateKeyPEMBase64 := os.Getenv("TEST_USER_PRIVATE_KEY_PEM_BASE64")
1519

1620
if accessKeyID == "" || secretAccessKey == "" {

v1/providers/aws/validation_network_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ import (
1010
)
1111

1212
var (
13+
isValidationTest = os.Getenv("VALIDATION_TEST")
1314
accessKeyID = os.Getenv("AWS_ACCESS_KEY_ID")
1415
secretAccessKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
1516
)
1617

1718
func TestAWSNetworkValidation(t *testing.T) {
19+
if isValidationTest == "" {
20+
t.Skip("VALIDATION_TEST is not set, skipping AWS Network validation tests")
21+
}
22+
1823
if accessKeyID == "" || secretAccessKey == "" {
1924
t.Fatalf("AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must be set")
2025
}

v1/providers/nebius/validation_kubernetes_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import (
1111
)
1212

1313
func TestKubernetesValidation(t *testing.T) {
14+
if isValidationTest == "" {
15+
t.Skip("VALIDATION_TEST is not set, skipping Nebius Kubernetes validation tests")
16+
}
17+
1418
testUserPrivateKeyPEMBase64 := os.Getenv("TEST_USER_PRIVATE_KEY_PEM_BASE64")
1519

1620
if privateKeyPEMBase64 == "" || publicKeyID == "" || serviceAccountID == "" || projectID == "" {

v1/providers/nebius/validation_network_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ import (
1010
)
1111

1212
var (
13+
isValidationTest = os.Getenv("VALIDATION_TEST")
1314
privateKeyPEMBase64 = os.Getenv("NEBIUS_PRIVATE_KEY_PEM_BASE64")
1415
publicKeyID = os.Getenv("NEBIUS_PUBLIC_KEY_ID")
1516
serviceAccountID = os.Getenv("NEBIUS_SERVICE_ACCOUNT_ID")
1617
projectID = os.Getenv("NEBIUS_PROJECT_ID")
1718
)
1819

1920
func TestNetworkValidation(t *testing.T) {
21+
if isValidationTest == "" {
22+
t.Skip("VALIDATION_TEST is not set, skipping Nebius Network validation tests")
23+
}
24+
2025
if privateKeyPEMBase64 == "" || publicKeyID == "" || serviceAccountID == "" || projectID == "" {
2126
t.Fatalf("NEBIUS_PRIVATE_KEY_PEM_BASE64, NEBIUS_PUBLIC_KEY_ID, NEBIUS_SERVICE_ACCOUNT_ID, and NEBIUS_PROJECT_ID must be set")
2227
}

0 commit comments

Comments
 (0)