Skip to content

Commit

Permalink
feat: more integration tests (#83)
Browse files Browse the repository at this point in the history
* feat: basic integration test

Signed-off-by: Norman Meier <[email protected]>

* feat: upgrade integration-test

Signed-off-by: Norman Meier <[email protected]>

* fix: commit

Signed-off-by: Norman Meier <[email protected]>

* chore: update test

Signed-off-by: Norman Meier <[email protected]>

* chore: update test

Signed-off-by: Norman Meier <[email protected]>

* chore: update test

Signed-off-by: Norman Meier <[email protected]>

* chore: update test

Signed-off-by: Norman Meier <[email protected]>

* fix: node version

Signed-off-by: Norman Meier <[email protected]>

* chore: update test

Signed-off-by: Norman Meier <[email protected]>

* chore: update test

Signed-off-by: Norman Meier <[email protected]>

* chore: optimize integration workflow

Signed-off-by: Norman Meier <[email protected]>

* chore: update testsg

Signed-off-by: Norman Meier <[email protected]>

---------

Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz authored Jan 21, 2024
1 parent 46aeeb3 commit a4abd9d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 30 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ on:

jobs:
test:
runs-on: ubuntu-latest
# teritorid hangs on ubuntu runner
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Checkout teritori-dapp repo
uses: actions/checkout@v4
with:
repository: TERITORI/teritori-dapp
path: teritori-dapp
ref: 66134e9580135a07aba64e00b68af9f30f8fdb93

- uses: actions/setup-go@v3
with:
Expand All @@ -19,6 +27,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache-dependency-path: "teritori-dapp/yarn.lock"

- name: Run integration test
run: make integration-test
- name: Run integration tests
run: make integration-tests
env:
TERITORI_DAPP_REPO: teritori-dapp
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ data
*.txt
.idea

/teritori-dapp/
/teritori-dapp/
/build/
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@ docker.publish:
docker build . --platform linux/amd64 -t $(IMAGE_TAG)
docker push $(IMAGE_TAG)

.PHONY: integration-test
integration-test:
.PHONY: integration-tests
integration-tests:
./integration-test/run.sh
17 changes: 15 additions & 2 deletions integration-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ set -euo pipefail
IFS=$'\n\t'
set -x

make install
commit=66134e9580135a07aba64e00b68af9f30f8fdb93

parallel --lb -j2 --halt now,done=1 ::: './start.sh >> node_logs.txt 2>&1' './integration-test/test.sh'
if [[ -z "${TERITORI_DAPP_REPO:-}" ]]; then
rm -fr teritori-dapp
git clone https://github.com/TERITORI/teritori-dapp.git
cd teritori-dapp
git checkout $commit
else
cd $TERITORI_DAPP_REPO
fi

yarn

npx tsx packages/scripts/integration-testing/simpleTest ..
npx tsx packages/scripts/integration-testing/upgradeTest142toDir ..
npx tsx packages/scripts/integration-testing/upgradeTest120toDir ..
21 changes: 0 additions & 21 deletions integration-test/test.sh

This file was deleted.

0 comments on commit a4abd9d

Please sign in to comment.