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 94b8e55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,18 @@ 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:
ref: ${{ env.LATEST_RELEASE }}
fetch-depth: 0
fetch-tags: true
sparse-checkout: exemplar
- 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 94b8e55

Please sign in to comment.