Skip to content

Commit

Permalink
run previous exemplar on current HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
safeer committed Oct 4, 2024
1 parent b5ace4b commit ff8ca55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,20 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: Get latest release tag
# TODO switch to: latest_release=$(git tag --sort=-v:refname | grep -v v1 | head -n 1)
run: |
latest_release=$(git tag --sort=-v:refname | grep -v v1 | head -n 1)
latest_release=$(git rev-parse HEAD^)
echo "Latest release: $latest_release"
echo "LATEST_RELEASE=$latest_release" >> "$GITHUB_ENV"
- name: Checkout previous code
- name: Check out exemplar from previous release
uses: actions/checkout@v4
with:
repository: TBD54566975/ftl.git
ref: ${{ env.LATEST_RELEASE }}
fetch-depth: 0
fetch-depth: 1
fetch-tags: true
sparse-checkout: smoketest
sparse-checkout-cone-mode: false
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
Expand Down
7 changes: 5 additions & 2 deletions smoketest/exemplar_smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package smoketest

import (
"fmt"
"testing"

"github.com/alecthomas/assert/v2"
Expand All @@ -16,8 +17,10 @@ func TestSmokeEcho(t *testing.T) {
in.WithTestDataDir("."),
in.CopyModule("echo"),
in.Deploy("echo"),
in.Call("echo", "echo", "Bob", func(t testing.TB, response string) {
assert.Equal(t, "Hello, Bob!!!", response)
in.Call("echo", "echo", "Joe", func(t testing.TB, response string) {
name := "Joe"
fmt.Printf("name: %s\n", name)
assert.Equal(t, "Hello, %s!!!", name, response)
}),
in.Exec("ftl", "--version"),
)
Expand Down

0 comments on commit ff8ca55

Please sign in to comment.