From 3058dc48a8ab8e723d5df8a9f44005ed0990681d Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 10:48:36 -0400 Subject: [PATCH 01/30] Try using a self-hosted runner --- .github/workflows/on-pr.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 0770355a..dda997cb 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -17,8 +17,7 @@ jobs: strategy: matrix: go-version: [1.16.x, 1.17.x] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} + runs-on: self-hosted steps: - name: Create GOPATH run: mkdir -p /tmp/go @@ -73,8 +72,8 @@ jobs: ETH_HTTP_PATH: "dapptools:8545" strategy: matrix: - go-version: [ 1.16.x ] - os: [ ubuntu-latest ] + go-version: [1.16.x] + os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Create GOPATH -- 2.45.2 From 19570f733f1c8fe047fada8f603ae6ee69bb8224 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:20:41 -0400 Subject: [PATCH 02/30] Hack - Run unit tests on Alabaster --- .github/workflows/on-pr.yaml | 41 +++++++++++++++++++++--------- .github/workflows/run_unit_test.sh | 29 +++++++++++++++++++++ 2 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/run_unit_test.sh diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index dda997cb..639b6bd6 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -14,24 +14,41 @@ jobs: name: Run unit tests env: GOPATH: /tmp/go + HOSTNAME: ${{ secrets.BUILD_HOSTNAME }} + USERNAME: ${{ secrets.BUILD_USERNAME }} + PRIVATE_KEY: ${{ secrets.BUILD_KEY }} + PASSWORD: ${{ secrets.BUILD_PASSWORD}} strategy: matrix: go-version: [1.16.x, 1.17.x] - runs-on: self-hosted + runs-on: ubuntu-latest steps: - - name: Create GOPATH - run: mkdir -p /tmp/go - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - uses: actions/checkout@v2 - - name: Run database - run: docker-compose up -d ipld-eth-db - - name: Test + + - name: Install sshpass + run: sudo apt-get install -y sshpass + + # Passed experience with GHA has taught me to store variables in files instead of passing them as variables. + - name: SCP necessary variables to the server run: | - sleep 10 - PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 DATABASE_NAME=vulcanize_testing make test + echo ${{ env.GITHUB_REPOSITORY}} > /tmp/git_repository + echo ${{ env.GITHUB_HEAD_REF}} > /tmp/git_head_ref + echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_repository + echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_head_ref + echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/run_unit_test.sh + + - name: Trigger Unit Test + run: echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} ssh {{ env.USERNAME }}@{{ env.HOSTNAME }} -i /dev/stdin /tmp/run_unit_test.sh + + - name: Get the logs and cat them + run: | + echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/test.log . + cat ./test.log + + - name: Check Error Code + run: | + echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/return_test.txt . + [ $(cat ./return_test.txt) -eq 0 ] integrationtest: name: Run integration tests diff --git a/.github/workflows/run_unit_test.sh b/.github/workflows/run_unit_test.sh new file mode 100644 index 00000000..8b80c5ab --- /dev/null +++ b/.github/workflows/run_unit_test.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +# Set up repo +start_dir=$(pwd) +temp_dir=$(mktemp -d) +cd $temp_dir +git clone -b $(cat /tmp/git_head_ref) "https://github.com/$(cat /tmp/git_repository).git" +cd ipld-eth-server + +## Remove the branch and github related info. This way future runs wont be confused. +rm -f /tmp/git_head_ref /tmp/git_repository + +# Spin up DB +docker-compose up -d ipld-eth-db +trap "docker-compose down --remove-orphans; cd $start_dir ; rm -r $temp_dir" SIGINT SIGTERM ERR +sleep 10 + +# Remove old logs so there's no confusion, then run test +rm -f /tmp/test.log /tmp/return_test.txt +PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 DATABASE_NAME=vulcanize_testing make test > /tmp/test.log +echo $? > /tmp/return_test.txt + +# Clean up +docker-compose down -v --remove-orphans +cd $start_dir +rm -fr $temp_dir + -- 2.45.2 From 63e77c9bc035928a954f174cd1e6aaf2ff374b98 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:35:44 -0400 Subject: [PATCH 03/30] Try SCP package --- .github/workflows/on-pr.yaml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 639b6bd6..b48abfb7 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -29,13 +29,24 @@ jobs: run: sudo apt-get install -y sshpass # Passed experience with GHA has taught me to store variables in files instead of passing them as variables. - - name: SCP necessary variables to the server + - name: Output variables run: | echo ${{ env.GITHUB_REPOSITORY}} > /tmp/git_repository echo ${{ env.GITHUB_HEAD_REF}} > /tmp/git_head_ref - echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_repository - echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_head_ref - echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/run_unit_test.sh + # echo ${{ env.PRIVATE_KEY }} | tr '\n' ''| sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_repository + # echo ${{ env.PRIVATE_KEY }} | tr '\n' ''| sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_head_ref + # echo ${{ env.PRIVATE_KEY }} | tr '\n' ''| sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/run_unit_test.sh + + - name: SCP some files + uses: appleboy/scp-action@master + with: + host: ${{ env.HOSTNAME }} + username: ${{ env.USERNAME }} + password: $ {{ env.PASSWORD }} + key: ${{ env.PRIVATE_KEY }} + port: 22 + source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" + target: "/tmp/" - name: Trigger Unit Test run: echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} ssh {{ env.USERNAME }}@{{ env.HOSTNAME }} -i /dev/stdin /tmp/run_unit_test.sh -- 2.45.2 From 88a89c0cc2c7b7139c87b77ad49a153baeedcf97 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:36:55 -0400 Subject: [PATCH 04/30] Use passphrase --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index b48abfb7..9ba17bfc 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -42,7 +42,7 @@ jobs: with: host: ${{ env.HOSTNAME }} username: ${{ env.USERNAME }} - password: $ {{ env.PASSWORD }} + passphrase: $ {{ env.PASSWORD }} key: ${{ env.PRIVATE_KEY }} port: 22 source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" -- 2.45.2 From 4446219c367998c9305a0c608ffaf28d16d6937a Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:38:54 -0400 Subject: [PATCH 05/30] No passphrase --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 9ba17bfc..b1d948b0 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -42,7 +42,7 @@ jobs: with: host: ${{ env.HOSTNAME }} username: ${{ env.USERNAME }} - passphrase: $ {{ env.PASSWORD }} + # passphrase: $ {{ env.PASSWORD }} key: ${{ env.PRIVATE_KEY }} port: 22 source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" -- 2.45.2 From 88e20dfc6ef8cea25b587a72940c7e0bf8e45838 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:42:20 -0400 Subject: [PATCH 06/30] Update ENV vars --- .github/workflows/on-pr.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index b1d948b0..33f96908 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -14,10 +14,10 @@ jobs: name: Run unit tests env: GOPATH: /tmp/go - HOSTNAME: ${{ secrets.BUILD_HOSTNAME }} - USERNAME: ${{ secrets.BUILD_USERNAME }} - PRIVATE_KEY: ${{ secrets.BUILD_KEY }} - PASSWORD: ${{ secrets.BUILD_PASSWORD}} + BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }} + BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }} + BUILD_KEY: ${{ secrets.BUILD_KEY }} + BUILD_PASSWORD: ${{ secrets.BUILD_PASSWORD}} strategy: matrix: go-version: [1.16.x, 1.17.x] @@ -33,32 +33,32 @@ jobs: run: | echo ${{ env.GITHUB_REPOSITORY}} > /tmp/git_repository echo ${{ env.GITHUB_HEAD_REF}} > /tmp/git_head_ref - # echo ${{ env.PRIVATE_KEY }} | tr '\n' ''| sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_repository - # echo ${{ env.PRIVATE_KEY }} | tr '\n' ''| sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/git_head_ref - # echo ${{ env.PRIVATE_KEY }} | tr '\n' ''| sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/run_unit_test.sh + # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: SCP some files uses: appleboy/scp-action@master with: - host: ${{ env.HOSTNAME }} - username: ${{ env.USERNAME }} - # passphrase: $ {{ env.PASSWORD }} - key: ${{ env.PRIVATE_KEY }} + host: ${{ env.BUILD_HOSTNAME }} + BUILD_USERNAME: ${{ env.BUILD_USERNAME }} + # passphrase: $ {{ env.BUILD_PASSWORD }} + key: ${{ env.BUILD_KEY }} port: 22 source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" target: "/tmp/" - name: Trigger Unit Test - run: echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} ssh {{ env.USERNAME }}@{{ env.HOSTNAME }} -i /dev/stdin /tmp/run_unit_test.sh + run: echo ${{ env.BUILD_KEY }} | sshpass -p ${{ env.BUILD_PASSWORD }} ssh {{ env.BUILD_USERNAME }}@{{ env.BUILD_HOSTNAME }} -i /dev/stdin /tmp/run_unit_test.sh - name: Get the logs and cat them run: | - echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/test.log . + echo ${{ env.BUILD_KEY }} | sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . cat ./test.log - name: Check Error Code run: | - echo ${{ env.PRIVATE_KEY }} | sshpass -p ${{ env.PASSWORD }} scp -i /dev/stdin {{ env.USERNAME }}@${{ env.HOSTNAME }}:/tmp/return_test.txt . + echo ${{ env.BUILD_KEY }} | sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] integrationtest: -- 2.45.2 From 01074ab55c08ac56da3a98d6592a2b1f407fa3c7 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:43:23 -0400 Subject: [PATCH 07/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 33f96908..03f3f422 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -41,7 +41,7 @@ jobs: uses: appleboy/scp-action@master with: host: ${{ env.BUILD_HOSTNAME }} - BUILD_USERNAME: ${{ env.BUILD_USERNAME }} + username: ${{ env.BUILD_USERNAME }} # passphrase: $ {{ env.BUILD_PASSWORD }} key: ${{ env.BUILD_KEY }} port: 22 -- 2.45.2 From 520be6bc86c4154e5d126e6438afa752c32a638a Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 16:44:40 -0400 Subject: [PATCH 08/30] Try paraphrase --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 03f3f422..bd4d5e08 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -42,7 +42,7 @@ jobs: with: host: ${{ env.BUILD_HOSTNAME }} username: ${{ env.BUILD_USERNAME }} - # passphrase: $ {{ env.BUILD_PASSWORD }} + passphrase: $ {{ env.BUILD_PASSWORD }} key: ${{ env.BUILD_KEY }} port: 22 source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" -- 2.45.2 From ef65993412e8eb924838018a0b61d627579cf687 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:01:34 -0400 Subject: [PATCH 09/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index bd4d5e08..6c92e97f 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -25,14 +25,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install sshpass - run: sudo apt-get install -y sshpass - # Passed experience with GHA has taught me to store variables in files instead of passing them as variables. - name: Output variables run: | - echo ${{ env.GITHUB_REPOSITORY}} > /tmp/git_repository - echo ${{ env.GITHUB_HEAD_REF}} > /tmp/git_head_ref + echo ${{ env.GITHUB_REPOSITORY }} > /tmp/git_repository + echo ${{ env.GITHUB_HEAD_REF }} > /tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh @@ -42,23 +39,28 @@ jobs: with: host: ${{ env.BUILD_HOSTNAME }} username: ${{ env.BUILD_USERNAME }} - passphrase: $ {{ env.BUILD_PASSWORD }} key: ${{ env.BUILD_KEY }} port: 22 source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" target: "/tmp/" - name: Trigger Unit Test - run: echo ${{ env.BUILD_KEY }} | sshpass -p ${{ env.BUILD_PASSWORD }} ssh {{ env.BUILD_USERNAME }}@{{ env.BUILD_HOSTNAME }} -i /dev/stdin /tmp/run_unit_test.sh + uses: appleboy/ssh-action@master + with: + host: ${{ env.BUILD_HOSTNAME }} + username: ${{ env.BUILD_USERNAME }} + key: ${{ env.BUILD_KEY }} + port: 22 + script: /tmp/run_unit_test.sh - name: Get the logs and cat them run: | - echo ${{ env.BUILD_KEY }} | sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . + echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . cat ./test.log - name: Check Error Code run: | - echo ${{ env.BUILD_KEY }} | sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . + echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] integrationtest: -- 2.45.2 From 20b75ff18f96531776fad090ae1d44ae827579e3 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:04:49 -0400 Subject: [PATCH 10/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 6c92e97f..b1275d92 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -28,8 +28,10 @@ jobs: # Passed experience with GHA has taught me to store variables in files instead of passing them as variables. - name: Output variables run: | - echo ${{ env.GITHUB_REPOSITORY }} > /tmp/git_repository - echo ${{ env.GITHUB_HEAD_REF }} > /tmp/git_head_ref + echo $GITHUB_REPOSITORY > /tmp/git_repository + echo $GITHUB_HEAD_REF > /tmp/git_head_ref + # echo ${{ env.GITHUB_REPOSITORY }} > /tmp/git_repository + # echo ${{ env.GITHUB_HEAD_REF }} > /tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh -- 2.45.2 From e924974ece12f984b61e25c677d1c5546c0cf8a2 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:07:18 -0400 Subject: [PATCH 11/30] Try raw scp command --- .github/workflows/on-pr.yaml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index b1275d92..66485720 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -30,21 +30,19 @@ jobs: run: | echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_HEAD_REF > /tmp/git_head_ref - # echo ${{ env.GITHUB_REPOSITORY }} > /tmp/git_repository - # echo ${{ env.GITHUB_HEAD_REF }} > /tmp/git_head_ref - # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository - # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - # echo ${{ env.BUILD_KEY }} | tr '\n' ''| sshpass -p ${{ env.BUILD_PASSWORD }} scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - - name: SCP some files - uses: appleboy/scp-action@master - with: - host: ${{ env.BUILD_HOSTNAME }} - username: ${{ env.BUILD_USERNAME }} - key: ${{ env.BUILD_KEY }} - port: 22 - source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" - target: "/tmp/" + #- name: SCP some files + # uses: appleboy/scp-action@master + # with: + # host: ${{ env.BUILD_HOSTNAME }} + # username: ${{ env.BUILD_USERNAME }} + # key: ${{ env.BUILD_KEY }} + # port: 22 + # source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" + # target: "/tmp/" - name: Trigger Unit Test uses: appleboy/ssh-action@master -- 2.45.2 From 61e6585f1cb635bcbe12c723912edb043f58fd1f Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:16:53 -0400 Subject: [PATCH 12/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 66485720..35071243 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -30,19 +30,19 @@ jobs: run: | echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_HEAD_REF > /tmp/git_head_ref - echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository - echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - #- name: SCP some files - # uses: appleboy/scp-action@master - # with: - # host: ${{ env.BUILD_HOSTNAME }} - # username: ${{ env.BUILD_USERNAME }} - # key: ${{ env.BUILD_KEY }} - # port: 22 - # source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" - # target: "/tmp/" + - name: SCP some files + uses: appleboy/scp-action@master + with: + host: ${{ env.BUILD_HOSTNAME }} + username: ${{ env.BUILD_USERNAME }} + key: ${{ env.BUILD_KEY }} + port: 22 + source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" + target: "/tmp/" - name: Trigger Unit Test uses: appleboy/ssh-action@master -- 2.45.2 From 3118bf4964b8d7606db32389fa04f2db96e0e1ac Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:21:33 -0400 Subject: [PATCH 13/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 35071243..f8525612 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -26,23 +26,31 @@ jobs: - uses: actions/checkout@v2 # Passed experience with GHA has taught me to store variables in files instead of passing them as variables. - - name: Output variables + - name: Output variables to files run: | echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_HEAD_REF > /tmp/git_head_ref + echo ${{ env.BUILD_KEY }} > /tmp/key + cat /tmp/git_repository + cat /tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + - name: Raw SCP + run: | + scp -i /tmp/key /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + scp -i /tmp/key /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + scp -i /tmp/key ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - - name: SCP some files - uses: appleboy/scp-action@master - with: - host: ${{ env.BUILD_HOSTNAME }} - username: ${{ env.BUILD_USERNAME }} - key: ${{ env.BUILD_KEY }} - port: 22 - source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" - target: "/tmp/" + #- name: SCP some files + # uses: appleboy/scp-action@master + # with: + # host: ${{ env.BUILD_HOSTNAME }} + # username: ${{ env.BUILD_USERNAME }} + # key: ${{ env.BUILD_KEY }} + # port: 22 + # source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" + # target: "/tmp/" - name: Trigger Unit Test uses: appleboy/ssh-action@master -- 2.45.2 From 1020ec18a4c88075e463dd6bffd74f615c8f2f4b Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:22:50 -0400 Subject: [PATCH 14/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index f8525612..aa478141 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -38,9 +38,9 @@ jobs: # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Raw SCP run: | - scp -i /tmp/key /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository - scp -i /tmp/key /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - scp -i /tmp/key ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + scp -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + scp -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + scp -i /tmp/key ./github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh #- name: SCP some files # uses: appleboy/scp-action@master -- 2.45.2 From e288a2933d3277946e0daad3e11ab1b3a548f4da Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:39:28 -0400 Subject: [PATCH 15/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 160 +++++++++++++++++------------------ 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index aa478141..dbc10791 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -3,13 +3,13 @@ name: Docker Build on: [pull_request] jobs: - build: - name: Run docker build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Run docker build - run: make docker-build + # build: + # name: Run docker build + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - name: Run docker build + # run: make docker-build test: name: Run unit tests env: @@ -17,10 +17,9 @@ jobs: BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }} BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }} BUILD_KEY: ${{ secrets.BUILD_KEY }} - BUILD_PASSWORD: ${{ secrets.BUILD_PASSWORD}} - strategy: - matrix: - go-version: [1.16.x, 1.17.x] + #strategy: + # matrix: + # go-version: [1.16.x, 1.17.x] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -38,19 +37,19 @@ jobs: # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Raw SCP run: | - scp -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository - scp -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - scp -i /tmp/key ./github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + scp -o 'StrictHostKeyChecking no' -i /tmp/key ./github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - #- name: SCP some files - # uses: appleboy/scp-action@master - # with: - # host: ${{ env.BUILD_HOSTNAME }} - # username: ${{ env.BUILD_USERNAME }} - # key: ${{ env.BUILD_KEY }} - # port: 22 - # source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" - # target: "/tmp/" + - name: SCP some files + uses: appleboy/scp-action@master + with: + host: ${{ env.BUILD_HOSTNAME }} + username: ${{ env.BUILD_USERNAME }} + key: ${{ env.BUILD_KEY }} + port: 22 + source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" + target: "/tmp/" - name: Trigger Unit Test uses: appleboy/ssh-action@master @@ -71,60 +70,61 @@ jobs: echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] - integrationtest: - name: Run integration tests - env: - GOPATH: /tmp/go - DB_WRITE: true - ETH_FORWARD_ETH_CALLS: false - ETH_PROXY_ON_ERROR: false - ETH_HTTP_PATH: "" - strategy: - matrix: - go-version: [1.16.x] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Create GOPATH - run: mkdir -p /tmp/go - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v2 - - name: Run database - run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server - - name: Test - run: | - while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ - while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ - make integrationtest - - integrationtest_forwardethcalls: - name: Run integration tests for direct proxy fall-through of eth_calls - env: - GOPATH: /tmp/go - DB_WRITE: false - ETH_FORWARD_ETH_CALLS: true - ETH_PROXY_ON_ERROR: false - ETH_HTTP_PATH: "dapptools:8545" - strategy: - matrix: - go-version: [1.16.x] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Create GOPATH - run: mkdir -p /tmp/go - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v2 - - name: Run database - run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server - - name: Test - run: | - while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ - while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ - make integrationtest +# integrationtest: +# name: Run integration tests +# env: +# GOPATH: /tmp/go +# DB_WRITE: true +# ETH_FORWARD_ETH_CALLS: false +# ETH_PROXY_ON_ERROR: false +# ETH_HTTP_PATH: "" +# strategy: +# matrix: +# go-version: [1.16.x] +# os: [ubuntu-latest] +# runs-on: ${{ matrix.os }} +# steps: +# - name: Create GOPATH +# run: mkdir -p /tmp/go +# - name: Install Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ matrix.go-version }} +# - uses: actions/checkout@v2 +# - name: Run database +# run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server +# - name: Test +# run: | +# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ +# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ +# make integrationtest +# +# integrationtest_forwardethcalls: +# name: Run integration tests for direct proxy fall-through of eth_calls +# env: +# GOPATH: /tmp/go +# DB_WRITE: false +# ETH_FORWARD_ETH_CALLS: true +# ETH_PROXY_ON_ERROR: false +# ETH_HTTP_PATH: "dapptools:8545" +# strategy: +# matrix: +# go-version: [1.16.x] +# os: [ubuntu-latest] +# runs-on: ${{ matrix.os }} +# steps: +# - name: Create GOPATH +# run: mkdir -p /tmp/go +# - name: Install Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ matrix.go-version }} +# - uses: actions/checkout@v2 +# - name: Run database +# run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server +# - name: Test +# run: | +# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ +# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ +# make integrationtest +# -- 2.45.2 From 72d3174f639f92b9e2d7ed26dd4e49b285d5d35a Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:40:23 -0400 Subject: [PATCH 16/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index dbc10791..ddda35ec 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -30,6 +30,7 @@ jobs: echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_HEAD_REF > /tmp/git_head_ref echo ${{ env.BUILD_KEY }} > /tmp/key + chmod 400 /tmp/key cat /tmp/git_repository cat /tmp/git_head_ref # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository -- 2.45.2 From 409521416bfcf207d46a4ec2cc4cefda3f6a7bbf Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:51:07 -0400 Subject: [PATCH 17/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index ddda35ec..0f12cac8 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -29,7 +29,9 @@ jobs: run: | echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_HEAD_REF > /tmp/git_head_ref - echo ${{ env.BUILD_KEY }} > /tmp/key + echo "-----BEGIN OPENSSH PRIVATE KEY-----' >> /tmp/key + echo ${{ env.BUILD_KEY }} >> /tmp/key + echo "-----END OPENSSH PRIVATE KEY-----' >> /tmp/key chmod 400 /tmp/key cat /tmp/git_repository cat /tmp/git_head_ref -- 2.45.2 From 2f6f939982cefabefbe175057ffba98b7c1282fc Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:52:04 -0400 Subject: [PATCH 18/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 0f12cac8..67afe820 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -29,9 +29,9 @@ jobs: run: | echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_HEAD_REF > /tmp/git_head_ref - echo "-----BEGIN OPENSSH PRIVATE KEY-----' >> /tmp/key + echo "-----BEGIN OPENSSH PRIVATE KEY-----" >> /tmp/key echo ${{ env.BUILD_KEY }} >> /tmp/key - echo "-----END OPENSSH PRIVATE KEY-----' >> /tmp/key + echo "-----END OPENSSH PRIVATE KEY-----" >> /tmp/key chmod 400 /tmp/key cat /tmp/git_repository cat /tmp/git_head_ref -- 2.45.2 From 850b305bf6dc3138a284e7cde9c1b367cea55a0f Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:55:37 -0400 Subject: [PATCH 19/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 67afe820..d72ecbbd 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -42,35 +42,25 @@ jobs: run: | scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - scp -o 'StrictHostKeyChecking no' -i /tmp/key ./github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - - - name: SCP some files - uses: appleboy/scp-action@master - with: - host: ${{ env.BUILD_HOSTNAME }} - username: ${{ env.BUILD_USERNAME }} - key: ${{ env.BUILD_KEY }} - port: 22 - source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh" - target: "/tmp/" + scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Trigger Unit Test uses: appleboy/ssh-action@master with: host: ${{ env.BUILD_HOSTNAME }} username: ${{ env.BUILD_USERNAME }} - key: ${{ env.BUILD_KEY }} + key_path: ${{ env.BUILD_KEY }} port: 22 script: /tmp/run_unit_test.sh - name: Get the logs and cat them run: | - echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . + scp -o 'StrictHostKeyChecking no' -i /tmp/key {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . cat ./test.log - name: Check Error Code run: | - echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . + scp -o 'StrictHostKeyChecking no' -i /tmp/key {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] # integrationtest: -- 2.45.2 From e6fb8599676b8efbd590bd23504602ff47bea488 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:56:35 -0400 Subject: [PATCH 20/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index d72ecbbd..a5e9e94d 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -51,7 +51,7 @@ jobs: username: ${{ env.BUILD_USERNAME }} key_path: ${{ env.BUILD_KEY }} port: 22 - script: /tmp/run_unit_test.sh + script: /tmp/key - name: Get the logs and cat them run: | -- 2.45.2 From 925b22869a4117869c485648592f90ac8997ca22 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:58:05 -0400 Subject: [PATCH 21/30] Updat path and perms --- .github/workflows/on-pr.yaml | 8 +++----- .github/workflows/run_unit_test.sh | 0 2 files changed, 3 insertions(+), 5 deletions(-) mode change 100644 => 100755 .github/workflows/run_unit_test.sh diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index a5e9e94d..c2338495 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -35,9 +35,7 @@ jobs: chmod 400 /tmp/key cat /tmp/git_repository cat /tmp/git_head_ref - # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_repository {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository - # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin /tmp/git_head_ref {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - # echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin ./github/workflows/run_unit_test.sh {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + - name: Raw SCP run: | scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository @@ -49,9 +47,9 @@ jobs: with: host: ${{ env.BUILD_HOSTNAME }} username: ${{ env.BUILD_USERNAME }} - key_path: ${{ env.BUILD_KEY }} + key_path: /tmp/key port: 22 - script: /tmp/key + script: /tmp/run_unit_test.sh - name: Get the logs and cat them run: | diff --git a/.github/workflows/run_unit_test.sh b/.github/workflows/run_unit_test.sh old mode 100644 new mode 100755 -- 2.45.2 From 627f2c7f815956e5ea01a4aee1d1f92dbc4587aa Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 17:59:31 -0400 Subject: [PATCH 22/30] Use raw ssh only --- .github/workflows/on-pr.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index c2338495..3d487384 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -43,13 +43,7 @@ jobs: scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Trigger Unit Test - uses: appleboy/ssh-action@master - with: - host: ${{ env.BUILD_HOSTNAME }} - username: ${{ env.BUILD_USERNAME }} - key_path: /tmp/key - port: 22 - script: /tmp/run_unit_test.sh + run: ssh -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/run_unit_test.sh - name: Get the logs and cat them run: | -- 2.45.2 From a780782bb6ae3437fd3624cbc2183b55d4a1365e Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:00:27 -0400 Subject: [PATCH 23/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 3d487384..0804dd82 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -43,7 +43,7 @@ jobs: scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Trigger Unit Test - run: ssh -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/run_unit_test.sh + run: ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh - name: Get the logs and cat them run: | -- 2.45.2 From 14332c2cd9a115b2f43d815384214631a8766919 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:01:34 -0400 Subject: [PATCH 24/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 0804dd82..8c7ccede 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -43,7 +43,7 @@ jobs: scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Trigger Unit Test - run: ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh + run: ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh; /tmp/run_unit_test.sh - name: Get the logs and cat them run: | -- 2.45.2 From 2fa941f0846ea6a8b9dd63bb79a126d20c95d4a9 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:02:58 -0400 Subject: [PATCH 25/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 8c7ccede..d9fa2d6a 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -43,7 +43,9 @@ jobs: scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Trigger Unit Test - run: ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh; /tmp/run_unit_test.sh + run: | + ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh /tmp/run_unit_test.sh + ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh - name: Get the logs and cat them run: | -- 2.45.2 From 6fa38fd1983be9a824d736f5148cdf66bc853ba4 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:27:38 -0400 Subject: [PATCH 26/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index d9fa2d6a..4c3e5ab3 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -1,7 +1,6 @@ name: Docker Build on: [pull_request] - jobs: # build: # name: Run docker build @@ -14,6 +13,7 @@ jobs: name: Run unit tests env: GOPATH: /tmp/go + # To run the unit tests you need to add secrets to your repository. BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }} BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }} BUILD_KEY: ${{ secrets.BUILD_KEY }} @@ -49,12 +49,12 @@ jobs: - name: Get the logs and cat them run: | - scp -o 'StrictHostKeyChecking no' -i /tmp/key {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . + scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . cat ./test.log - name: Check Error Code run: | - scp -o 'StrictHostKeyChecking no' -i /tmp/key {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . + scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] # integrationtest: -- 2.45.2 From f600ea46bcf4d3f905d2ea5fdeb30667b8f51c5f Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:31:23 -0400 Subject: [PATCH 27/30] Update on-pr.yaml --- .github/workflows/on-pr.yaml | 129 +++++++++++++++++------------------ 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 4c3e5ab3..ef62bf87 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -2,13 +2,13 @@ name: Docker Build on: [pull_request] jobs: - # build: - # name: Run docker build - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - name: Run docker build - # run: make docker-build + build: + name: Run docker build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run docker build + run: make docker-build test: name: Run unit tests env: @@ -57,61 +57,60 @@ jobs: scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] -# integrationtest: -# name: Run integration tests -# env: -# GOPATH: /tmp/go -# DB_WRITE: true -# ETH_FORWARD_ETH_CALLS: false -# ETH_PROXY_ON_ERROR: false -# ETH_HTTP_PATH: "" -# strategy: -# matrix: -# go-version: [1.16.x] -# os: [ubuntu-latest] -# runs-on: ${{ matrix.os }} -# steps: -# - name: Create GOPATH -# run: mkdir -p /tmp/go -# - name: Install Go -# uses: actions/setup-go@v2 -# with: -# go-version: ${{ matrix.go-version }} -# - uses: actions/checkout@v2 -# - name: Run database -# run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server -# - name: Test -# run: | -# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ -# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ -# make integrationtest -# -# integrationtest_forwardethcalls: -# name: Run integration tests for direct proxy fall-through of eth_calls -# env: -# GOPATH: /tmp/go -# DB_WRITE: false -# ETH_FORWARD_ETH_CALLS: true -# ETH_PROXY_ON_ERROR: false -# ETH_HTTP_PATH: "dapptools:8545" -# strategy: -# matrix: -# go-version: [1.16.x] -# os: [ubuntu-latest] -# runs-on: ${{ matrix.os }} -# steps: -# - name: Create GOPATH -# run: mkdir -p /tmp/go -# - name: Install Go -# uses: actions/setup-go@v2 -# with: -# go-version: ${{ matrix.go-version }} -# - uses: actions/checkout@v2 -# - name: Run database -# run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server -# - name: Test -# run: | -# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ -# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ -# make integrationtest -# + integrationtest: + name: Run integration tests + env: + GOPATH: /tmp/go + DB_WRITE: true + ETH_FORWARD_ETH_CALLS: false + ETH_PROXY_ON_ERROR: false + ETH_HTTP_PATH: "" + strategy: + matrix: + go-version: [1.16.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Create GOPATH + run: mkdir -p /tmp/go + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v2 + - name: Run database + run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server + - name: Test + run: | + while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ + while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ + make integrationtest + + integrationtest_forwardethcalls: + name: Run integration tests for direct proxy fall-through of eth_calls + env: + GOPATH: /tmp/go + DB_WRITE: false + ETH_FORWARD_ETH_CALLS: true + ETH_PROXY_ON_ERROR: false + ETH_HTTP_PATH: "dapptools:8545" + strategy: + matrix: + go-version: [1.16.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Create GOPATH + run: mkdir -p /tmp/go + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v2 + - name: Run database + run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server + - name: Test + run: | + while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ + while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ + make integrationtest -- 2.45.2 From 3e211d5978ef22dc636eb40fe22e339570d29305 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:34:46 -0400 Subject: [PATCH 28/30] Test failure --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index ef62bf87..71562064 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -55,7 +55,7 @@ jobs: - name: Check Error Code run: | scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . - [ $(cat ./return_test.txt) -eq 0 ] + [ $(cat ./return_test.txt) -eq 1 ] integrationtest: name: Run integration tests -- 2.45.2 From 6ab34eb878642821cac8fd28d6cf3fa43ba8e8bb Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:36:28 -0400 Subject: [PATCH 29/30] Tested return code logic --- .github/workflows/on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 71562064..ef62bf87 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -55,7 +55,7 @@ jobs: - name: Check Error Code run: | scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . - [ $(cat ./return_test.txt) -eq 1 ] + [ $(cat ./return_test.txt) -eq 0 ] integrationtest: name: Run integration tests -- 2.45.2 From f61691a26ecb6347a6b9aa7fd98fab6a9cb8ccc3 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Mon, 18 Apr 2022 18:41:54 -0400 Subject: [PATCH 30/30] Quiet the output from SCP and ssh --- .github/workflows/on-pr.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index ef62bf87..c139e829 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -38,23 +38,23 @@ jobs: - name: Raw SCP run: | - scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository - scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref - scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh + scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository + scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref + scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh - name: Trigger Unit Test run: | - ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh /tmp/run_unit_test.sh - ssh -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh + ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh /tmp/run_unit_test.sh + ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh - name: Get the logs and cat them run: | - scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . + scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . cat ./test.log - name: Check Error Code run: | - scp -o 'StrictHostKeyChecking no' -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . + scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . [ $(cat ./return_test.txt) -eq 0 ] integrationtest: -- 2.45.2