Skip to content

Commit

Permalink
Merge pull request #141 from matrix-org/kegan/sub-api
Browse files Browse the repository at this point in the history
Move rust specific tests to dedicated rust package
  • Loading branch information
kegsay authored Sep 27, 2024
2 parents c1da804 + 52b9cb8 commit e1e824b
Show file tree
Hide file tree
Showing 15 changed files with 241 additions and 105 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/single_sdk_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
type: string
jobs:
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
# At this stage we don't know which repo we have just checked out. We will reference this repo
# if the workflow uses '.'
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
export COMPLEMENT_CRYPTO_RPC_BINARY="$(pwd)/complement-crypto/rpc"
cd complement-crypto &&
set -o pipefail &&
go test -v -count=1 -json -tags=$GO_TAGS -timeout 15m ./tests | gotestfmt
go test -v -p 2 -count=1 -json -tags=$GO_TAGS -timeout 15m ./tests ./tests/$LANG_SPECIFIC_TESTS | gotestfmt
shell: bash # required for pipefail to be A Thing. pipefail is required to stop gotestfmt swallowing non-zero exit codes
env:
COMPLEMENT_BASE_IMAGE: homeserver
Expand All @@ -182,6 +182,7 @@ jobs:
PASS_SYNAPSE_COMPLEMENT_DATABASE: sqlite
DOCKER_BUILDKIT: 1
GO_TAGS: ${{ inputs.use_js_sdk != '' && 'jssdk' || 'rust'}}
LANG_SPECIFIC_TESTS: ${{ inputs.use_js_sdk != '' && 'js' || 'rust'}}
RUST_SDK_LIB_RELATIVE: ${{ inputs.use_rust_sdk == '.' && '/target/debug' || '/complement-crypto/rust-sdk/target/debug'}}

- name: Upload logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

complement:
name: Tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3 # Checkout crypto tests

Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
export LD_LIBRARY_PATH="$(pwd)/rust-sdk/target/debug"
export COMPLEMENT_CRYPTO_RPC_BINARY="$(pwd)/rpc"
set -o pipefail &&
go test -v -json -tags='jssdk,rust' -count=1 -timeout 15m ./tests | gotestfmt
go test -p 3 -v -json -tags='jssdk,rust' -count=1 -timeout 15m ./tests ./tests/js ./tests/rust | gotestfmt
shell: bash # required for pipefail to be A Thing. pipefail is required to stop gotestfmt swallowing non-zero exit codes
name: Run Complement Crypto Tests
env:
Expand Down
76 changes: 45 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,70 +1,84 @@
module github.com/matrix-org/complement-crypto

go 1.20
go 1.22

toolchain go1.22.1

require (
github.com/chromedp/cdproto v0.0.0-20231025043423-5615e204d422
github.com/chromedp/chromedp v0.9.3
github.com/docker/go-connections v0.4.0
github.com/matrix-org/complement v0.0.0-20240925112704-9fb870eb8461
github.com/testcontainers/testcontainers-go v0.26.0
github.com/docker/go-connections v0.5.0
github.com/matrix-org/complement v0.0.0-20240925142218-911d7d39773a
github.com/testcontainers/testcontainers-go v0.31.0
github.com/tidwall/gjson v1.16.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.11.7 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/chromedp/sysutil v1.0.0 // indirect
github.com/containerd/containerd v1.7.7 // indirect
github.com/containerd/containerd v1.7.22 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v24.0.9+incompatible // indirect
github.com/docker/docker v26.1.5+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 // indirect
github.com/matrix-org/gomatrixserverlib v0.0.0-20230921171121-0466775328c7 // indirect
github.com/matrix-org/util v0.0.0-20221111132719-399730281e66 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/user v0.3.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/shirou/gopsutil/v3 v3.23.9 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect
go.opentelemetry.io/otel v1.30.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.57.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
maunium.net/go/mautrix v0.11.0 // indirect
)
Loading

0 comments on commit e1e824b

Please sign in to comment.