From 6464cdc6aa92a7bc3a916e840efd674a803af496 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Mon, 24 Jan 2022 16:59:51 +0800 Subject: [PATCH 1/5] feat: Add scripts tests --- .github/workflows/scripts-test.yml | 45 ++++++++++++++++++++++++++++++ .gitmodules | 3 ++ testcases/godwoken-scripts-tests | 1 + 3 files changed, 49 insertions(+) create mode 100644 .github/workflows/scripts-test.yml create mode 160000 testcases/godwoken-scripts-tests diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml new file mode 100644 index 00000000..ee5de63d --- /dev/null +++ b/.github/workflows/scripts-test.yml @@ -0,0 +1,45 @@ +name: Scripts-Test + +on: + push: + # schedule: + # You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). + # Scheduled workflows run on the latest commit on the default or base branch. + # The shortest interval you can run scheduled workflows is once every 5 minutes. + # Note: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot. + # You can use crontab guru (https://crontab.guru/) to help generate your cron syntax and confirm what time it will run. + # To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html). + # - cron: '* 1 * * *' + +jobs: + fee-test: + strategy: + fail-fast: false + matrix: + net: ['alphanet'] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - uses: actions/setup-node@v2 + with: + node-version: '16' + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Node Cache + uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Run Test + working-directory: testcases/godwoken-scripts-tests + run: | + yarn + yarn start:${{ matrix.net }} diff --git a/.gitmodules b/.gitmodules index 3f5e1839..4959f761 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,3 +18,6 @@ [submodule "testcases/gw-fee-test"] path = testcases/gw-fee-test url = https://github.com/RetricSu/gw-fee-test.git +[submodule "testcases/godwoken-scripts-tests"] + path = testcases/godwoken-scripts-tests + url = https://github.com/classicalliu/godwoken-scripts-tests diff --git a/testcases/godwoken-scripts-tests b/testcases/godwoken-scripts-tests new file mode 160000 index 00000000..32583b65 --- /dev/null +++ b/testcases/godwoken-scripts-tests @@ -0,0 +1 @@ +Subproject commit 32583b6554734f46cfd5b6729e5958603036f7ee From b5cd8f9be3e3cc9baf388caa82c8597db8acd92e Mon Sep 17 00:00:00 2001 From: classicalliu Date: Mon, 24 Jan 2022 17:20:55 +0800 Subject: [PATCH 2/5] chore: Add testnet schedule --- .github/workflows/scripts-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index ee5de63d..b251e13a 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -2,21 +2,21 @@ name: Scripts-Test on: push: - # schedule: + schedule: # You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). # Scheduled workflows run on the latest commit on the default or base branch. # The shortest interval you can run scheduled workflows is once every 5 minutes. # Note: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot. # You can use crontab guru (https://crontab.guru/) to help generate your cron syntax and confirm what time it will run. # To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html). - # - cron: '* 1 * * *' + - cron: '* 1 * * *' jobs: fee-test: strategy: fail-fast: false matrix: - net: ['alphanet'] + net: ['alphanet', 'testnet'] runs-on: ubuntu-latest steps: From 3334925b70d7f25419d02705539043f216a14cd7 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Mon, 24 Jan 2022 17:34:22 +0800 Subject: [PATCH 3/5] chore: Update godwoken-scripts-tests --- testcases/godwoken-scripts-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/godwoken-scripts-tests b/testcases/godwoken-scripts-tests index 32583b65..6e88f7b1 160000 --- a/testcases/godwoken-scripts-tests +++ b/testcases/godwoken-scripts-tests @@ -1 +1 @@ -Subproject commit 32583b6554734f46cfd5b6729e5958603036f7ee +Subproject commit 6e88f7b1289f03c1c7bac51db6679b5bae2acfa7 From 9ed7f2549ff06c47ecb4e32bf478097c32a6ed17 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Mon, 24 Jan 2022 17:35:33 +0800 Subject: [PATCH 4/5] chore: Update ci name --- .github/workflows/scripts-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index b251e13a..81e111ed 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -12,7 +12,7 @@ on: - cron: '* 1 * * *' jobs: - fee-test: + scripts-test: strategy: fail-fast: false matrix: From 8fa8d80cb4c05fcc3a5a8f222e5210f6213ab749 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Mon, 24 Jan 2022 17:53:00 +0800 Subject: [PATCH 5/5] chore: Update godwoken-scripts-tests --- testcases/godwoken-scripts-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/godwoken-scripts-tests b/testcases/godwoken-scripts-tests index 6e88f7b1..dcd84cb3 160000 --- a/testcases/godwoken-scripts-tests +++ b/testcases/godwoken-scripts-tests @@ -1 +1 @@ -Subproject commit 6e88f7b1289f03c1c7bac51db6679b5bae2acfa7 +Subproject commit dcd84cb3054787d62068e6d586bf5d15723a7d42