Skip to content

Commit 908b977

Browse files
committed
fix unit tests
1 parent 726c93b commit 908b977

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/release.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,24 @@ on:
33
# run only against tags
44
tags:
55
- "*"
6-
branches:
7-
- "**"
8-
workflow_dispatch:
96

107
permissions:
118
contents: write
129

1310
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: stable
19+
20+
- run: go test ./...
21+
1422
build-documentation:
23+
needs: [test]
1524
runs-on: ubuntu-latest
1625
steps:
1726
- uses: actions/checkout@v4
@@ -29,6 +38,7 @@ jobs:
2938
path: docs/gorpheus.pdf
3039

3140
build:
41+
needs: [test]
3242
name: build binaries
3343
runs-on: ubuntu-latest
3444
strategy:

internal/planner/prepare_plan.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ func (p *Planner) PreparePlan(namespace string, version string) ([]*migration.Mi
5757
if err != nil {
5858
return nil, direction, err
5959
}
60+
if currentVersionFound && versionNum == currentVersion {
61+
// namespace is already migrated to the expected version - no-op.
62+
return nil, direction, nil
63+
}
6064
if currentVersionFound && versionNum < currentVersion {
6165
// let's do a small trick. since the calculate path function appends
6266
// dest node to the path, let's increment the "expected" version

0 commit comments

Comments
 (0)