Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and test workflow. #10

Merged
merged 14 commits into from
Sep 19, 2024
25 changes: 25 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build-and-test
run-name: "Build and test"

on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.3'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
4 changes: 3 additions & 1 deletion pkg/migrator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var migrateAcrossVersionsTestCases = []struct {
currentVersion: 1,
versionTo: ptr(4),
includeMigrationsToVersions: []int{},
expected: version1Config,
expected: nilConfig,
},
}

Expand Down Expand Up @@ -112,6 +112,8 @@ var migrationData = map[int]map[string]interface{}{
4: version4Migration,
}

var nilConfig = map[string]interface{}(nil)

var version1Config = map[string]interface{}{
"agent": map[interface{}]interface{}{
"targetEnvironment": "test",
Expand Down
Loading