Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.25.0'
go-version-file: 'go.mod'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh this is cool


- name: Cache Go modules
uses: actions/cache@v4
Expand All @@ -31,8 +31,13 @@ jobs:
- name: Install dependencies
run: make deps

- name: Run checks (lint, vet, fmt-check, test)
run: make check
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.6.0

- name: Run checks (vet, fmt-check, test)
run: make vet fmt-check test

# Note: Validation tests with real cloud providers run in separate workflows
# See .github/workflows/validation-*.yml for provider-specific validation tests
Expand Down Expand Up @@ -63,7 +68,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.0'
go-version-file: 'go.mod'

- name: Cache Go modules
uses: actions/cache@v4
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/validation-aws.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: AWS Validation Tests

on:
schedule:
# Run daily at 2 AM UTC
- cron: "0 2 * * *"
workflow_dispatch:
# Allow manual triggering
pull_request:
paths:
- "v1/providers/aws/**"
- "internal/validation/**"
- "v1/**"
branches: [main]

jobs:
aws-validation:
name: AWS Provider Validation
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Install dependencies
run: make deps

- name: Run AWS validation tests
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
TEST_USER_PRIVATE_KEY_PEM_BASE64: ${{ secrets.TEST_USER_PRIVATE_KEY_PEM_BASE64 }}
VALIDATION_TEST: true
run: |
cd v1/providers/aws
go test -v -short=false -timeout=30m ./...

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: aws-validation-results
path: |
v1/providers/aws/coverage.out
2 changes: 1 addition & 1 deletion .github/workflows/validation-lambdalabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.0'
go-version-file: 'go.mod'

- name: Cache Go modules
uses: actions/cache@v4
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/validation-nebius.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Nebius Validation Tests

on:
schedule:
# Run daily at 2 AM UTC
- cron: "0 2 * * *"
workflow_dispatch:
# Allow manual triggering
pull_request:
paths:
- "v1/providers/nebius/**"
- "internal/validation/**"
- "v1/**"
branches: [main]

jobs:
nebius-validation:
name: Nebius Provider Validation
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Install dependencies
run: make deps

- name: Run Nebius validation tests
env:
NEBIUS_PUBLIC_KEY_ID: ${{ secrets.NEBIUS_PUBLIC_KEY_ID }}
NEBIUS_PRIVATE_KEY_PEM_BASE64: ${{ secrets.NEBIUS_PRIVATE_KEY_PEM_BASE64 }}
NEBIUS_SERVICE_ACCOUNT_ID: ${{ secrets.NEBIUS_SERVICE_ACCOUNT_ID }}
NEBIUS_PROJECT_ID: ${{ secrets.NEBIUS_PROJECT_ID }}
TEST_USER_PRIVATE_KEY_PEM_BASE64: ${{ secrets.TEST_USER_PRIVATE_KEY_PEM_BASE64 }}
VALIDATION_TEST: true
run: |
cd v1/providers/nebius
go test -v -short=false -timeout=30m ./...

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: nebius-validation-results
path: |
v1/providers/nebius/coverage.out
12 changes: 6 additions & 6 deletions .github/workflows/validation-shadeform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Shadeform Validation Tests
on:
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
- cron: "0 2 * * *"
workflow_dispatch:
# Allow manual triggering
pull_request:
paths:
- 'v1/providers/shadeform/**'
- 'internal/validation/**'
- 'v1/**'
branches: [ main ]
- "v1/providers/shadeform/**"
- "internal/validation/**"
- "v1/**"
branches: [main]

jobs:
shadeform-validation:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.0'
go-version-file: "go.mod"

- name: Cache Go modules
uses: actions/cache@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
__debug_bin*
.idea/*
coverage/*
109 changes: 109 additions & 0 deletions .golangci.bck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
run:
build-tags:
- tasks
linters-settings:
goimports:
local-prefixes: github.com/brevdev/dev-plane
revive:
# min-confidence: 0.8
rules:
- name: blank-imports
- name: context-as-argument
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
# - name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
gocyclo:
min-complexity: 15
misspell:
locale: US
nolintlint:
# allow-leading-space: false # require machine-readable nolint directives (with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
funlen:
lines: 100
errcheck:
exclude-functions:
- (*encoding/json.Encoder).Encode
wrapcheck:
ignoreSigs:
- .WrapAndTrace
- .Errorf
- .Wrap
- .New
- .ValidateStruct
- .Permanent
- .Decode
stylecheck:
checks: ["all", "-ST1020", "-ST1000", "-ST1021"]

linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- errcheck
# - gosimple # don't like
- govet
- ineffassign
# - staticcheck # broken in collections pkg?
- typecheck
- bodyclose
- unused
# - depguard
- dupl
- copyloopvar
- forcetypeassert
- funlen
# - gci # don't like
- gocognit
- goconst
- gocritic
- gocyclo
# - godot # don't like
- gofumpt
- revive
# - gomnd # don't like
- goprintffuncname
- gosec
# - ifshort # don't like
- misspell
- noctx
- nolintlint
- rowserrcheck # broken with generics
- sqlclosecheck # broken with generics
- stylecheck
# - thelper
- tparallel
- unconvert
- unparam
- whitespace
# - errorlint
# - goerr113
# - wrapcheck
issues:
# enable issues excluded by default
exclude-use-default: false
exclude:
- composites
exclude-dirs:
- internal/lambdalabs/gen
Loading