Skip to content

Commit

Permalink
feat: basic integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Jan 18, 2024
1 parent 3fc9457 commit 008e505
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Integration

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: "1.20"

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Run integration test
run: make integration-test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,7 @@ proto-check-breaking:
docker.publish:
docker build . --platform linux/amd64 -t $(IMAGE_TAG)
docker push $(IMAGE_TAG)

.PHONY: integration-test
integration-test:
./integration-test/run.sh
8 changes: 8 additions & 0 deletions integration-test/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
set -x

make install

parallel --lb -j2 --halt-on-error 2 ::: './start.sh' './integration-test/test.sh'
15 changes: 15 additions & 0 deletions integration-test/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
set -x

rm -fr teritori-dapp
git clone https://github.com/TERITORI/teritori-dapp.git
cd teritori-dapp
git checkout 267a3f9604d48c6f1ea5c31d13a5d24c6ed35210

yarn

while ! curl http://localhost:1317/node_info; do sleep 1; done

npx tsx packages/scripts/network-setup/deploy teritori-localnet validator

0 comments on commit 008e505

Please sign in to comment.