forked from cerc-io/ipld-eth-server
Update on-pr.yaml
This commit is contained in:
parent
1020ec18a4
commit
e288a2933d
160
.github/workflows/on-pr.yaml
vendored
160
.github/workflows/on-pr.yaml
vendored
@ -3,13 +3,13 @@ name: Docker Build
|
|||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
# build:
|
||||||
name: Run docker build
|
# name: Run docker build
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v2
|
# - uses: actions/checkout@v2
|
||||||
- name: Run docker build
|
# - name: Run docker build
|
||||||
run: make docker-build
|
# run: make docker-build
|
||||||
test:
|
test:
|
||||||
name: Run unit tests
|
name: Run unit tests
|
||||||
env:
|
env:
|
||||||
@ -17,10 +17,9 @@ jobs:
|
|||||||
BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }}
|
BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }}
|
||||||
BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }}
|
BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }}
|
||||||
BUILD_KEY: ${{ secrets.BUILD_KEY }}
|
BUILD_KEY: ${{ secrets.BUILD_KEY }}
|
||||||
BUILD_PASSWORD: ${{ secrets.BUILD_PASSWORD}}
|
#strategy:
|
||||||
strategy:
|
# matrix:
|
||||||
matrix:
|
# go-version: [1.16.x, 1.17.x]
|
||||||
go-version: [1.16.x, 1.17.x]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- 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
|
# 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
|
- name: Raw SCP
|
||||||
run: |
|
run: |
|
||||||
scp -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository
|
scp -o 'StrictHostKeyChecking no' -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 -o 'StrictHostKeyChecking no' -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 ./github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh
|
||||||
|
|
||||||
#- name: SCP some files
|
- name: SCP some files
|
||||||
# uses: appleboy/scp-action@master
|
uses: appleboy/scp-action@master
|
||||||
# with:
|
with:
|
||||||
# host: ${{ env.BUILD_HOSTNAME }}
|
host: ${{ env.BUILD_HOSTNAME }}
|
||||||
# username: ${{ env.BUILD_USERNAME }}
|
username: ${{ env.BUILD_USERNAME }}
|
||||||
# key: ${{ env.BUILD_KEY }}
|
key: ${{ env.BUILD_KEY }}
|
||||||
# port: 22
|
port: 22
|
||||||
# source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh"
|
source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh"
|
||||||
# target: "/tmp/"
|
target: "/tmp/"
|
||||||
|
|
||||||
- name: Trigger Unit Test
|
- name: Trigger Unit Test
|
||||||
uses: appleboy/ssh-action@master
|
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 .
|
echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt .
|
||||||
[ $(cat ./return_test.txt) -eq 0 ]
|
[ $(cat ./return_test.txt) -eq 0 ]
|
||||||
|
|
||||||
integrationtest:
|
# integrationtest:
|
||||||
name: Run integration tests
|
# name: Run integration tests
|
||||||
env:
|
# env:
|
||||||
GOPATH: /tmp/go
|
# GOPATH: /tmp/go
|
||||||
DB_WRITE: true
|
# DB_WRITE: true
|
||||||
ETH_FORWARD_ETH_CALLS: false
|
# ETH_FORWARD_ETH_CALLS: false
|
||||||
ETH_PROXY_ON_ERROR: false
|
# ETH_PROXY_ON_ERROR: false
|
||||||
ETH_HTTP_PATH: ""
|
# ETH_HTTP_PATH: ""
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
go-version: [1.16.x]
|
# go-version: [1.16.x]
|
||||||
os: [ubuntu-latest]
|
# os: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
# runs-on: ${{ matrix.os }}
|
||||||
steps:
|
# steps:
|
||||||
- name: Create GOPATH
|
# - name: Create GOPATH
|
||||||
run: mkdir -p /tmp/go
|
# run: mkdir -p /tmp/go
|
||||||
- name: Install Go
|
# - name: Install Go
|
||||||
uses: actions/setup-go@v2
|
# uses: actions/setup-go@v2
|
||||||
with:
|
# with:
|
||||||
go-version: ${{ matrix.go-version }}
|
# go-version: ${{ matrix.go-version }}
|
||||||
- uses: actions/checkout@v2
|
# - uses: actions/checkout@v2
|
||||||
- name: Run database
|
# - name: Run database
|
||||||
run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server
|
# run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server
|
||||||
- name: Test
|
# - name: Test
|
||||||
run: |
|
# 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: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 && \
|
# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \
|
||||||
make integrationtest
|
# make integrationtest
|
||||||
|
#
|
||||||
integrationtest_forwardethcalls:
|
# integrationtest_forwardethcalls:
|
||||||
name: Run integration tests for direct proxy fall-through of eth_calls
|
# name: Run integration tests for direct proxy fall-through of eth_calls
|
||||||
env:
|
# env:
|
||||||
GOPATH: /tmp/go
|
# GOPATH: /tmp/go
|
||||||
DB_WRITE: false
|
# DB_WRITE: false
|
||||||
ETH_FORWARD_ETH_CALLS: true
|
# ETH_FORWARD_ETH_CALLS: true
|
||||||
ETH_PROXY_ON_ERROR: false
|
# ETH_PROXY_ON_ERROR: false
|
||||||
ETH_HTTP_PATH: "dapptools:8545"
|
# ETH_HTTP_PATH: "dapptools:8545"
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
go-version: [1.16.x]
|
# go-version: [1.16.x]
|
||||||
os: [ubuntu-latest]
|
# os: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
# runs-on: ${{ matrix.os }}
|
||||||
steps:
|
# steps:
|
||||||
- name: Create GOPATH
|
# - name: Create GOPATH
|
||||||
run: mkdir -p /tmp/go
|
# run: mkdir -p /tmp/go
|
||||||
- name: Install Go
|
# - name: Install Go
|
||||||
uses: actions/setup-go@v2
|
# uses: actions/setup-go@v2
|
||||||
with:
|
# with:
|
||||||
go-version: ${{ matrix.go-version }}
|
# go-version: ${{ matrix.go-version }}
|
||||||
- uses: actions/checkout@v2
|
# - uses: actions/checkout@v2
|
||||||
- name: Run database
|
# - name: Run database
|
||||||
run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server
|
# run: docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server
|
||||||
- name: Test
|
# - name: Test
|
||||||
run: |
|
# 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: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 && \
|
# while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \
|
||||||
make integrationtest
|
# make integrationtest
|
||||||
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user