Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more integration tests #83

Merged
merged 12 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading