Skip to content

Commit

Permalink
chore: Use matrix to target example directories in addition to top-le…
Browse files Browse the repository at this point in the history
…vel (#44)

Signed-off-by: Joonas Bergius <[email protected]>
  • Loading branch information
joonas authored Oct 2, 2024
1 parent e8a4994 commit 6d99444
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
module:
- .
- examples/http-server
- examples/keyvalue-inmemory

steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand All @@ -17,10 +24,10 @@ jobs:
go-version: "1.22"

- name: Build
run: go build -v ./...
run: go build -C ${{ matrix.module }} -v ./...

- name: Test
run: go test -v ./...
run: go test -C ${{ matrix.module }} -v ./...

lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions examples/http-server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/wasmCloud/provider-sdk-go/examples/http-server

go 1.22.3

replace go.wasmcloud.dev/provider => ../..

require (
go.wasmcloud.dev/provider v0.0.0-20240124183610-1a92f8d04935
wrpc.io/go v0.1.0
Expand Down Expand Up @@ -41,5 +43,3 @@ require (
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
)

replace go.wasmcloud.dev/provider => ../..
13 changes: 7 additions & 6 deletions examples/keyvalue-inmemory/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ module github.com/wasmCloud/provider-sdk-go/examples/keyvalue-inmemory

go 1.22.3

// NOTE: This is temporary until https://github.com/testcontainers/testcontainers-go/pull/2738
// makes it into an actual release (v0.33.0+)
replace github.com/testcontainers/testcontainers-go => github.com/testcontainers/testcontainers-go v0.33.1-0.20240912084704-b60497e9c792
replace (
// NOTE: This is temporary until https://github.com/testcontainers/testcontainers-go/pull/2738
// makes it into an actual release (v0.33.0+)
github.com/testcontainers/testcontainers-go => github.com/testcontainers/testcontainers-go v0.33.1-0.20240912084704-b60497e9c792
go.wasmcloud.dev/provider => ../..
)

require (
github.com/nats-io/nats.go v1.37.0
Expand Down Expand Up @@ -82,6 +85,4 @@ require (
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace go.wasmcloud.dev/provider => ../..
)

0 comments on commit 6d99444

Please sign in to comment.