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

CI: add job test-last-tracing-runtime #29

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [opened, edited, synchronize]

env:
MOONBEAM_GIT_REF: "master"
MOONBEAM_LAST_CLIENT_TAG: "v0.22.0"

jobs:

list-spec-versions:
Expand Down Expand Up @@ -101,3 +105,35 @@ jobs:
if: steps.filter.outputs.edited == 'true' || steps.filter.outputs.shared == 'true'
run: |
./scripts/check-tracing-runtime.sh ${{ matrix.spec_version }}
test-last-tracing-runtime:
name: "Test last tracing runtime"
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
needs: ["check-tracing-runtime"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get moonbeam binary
run: |
./scripts/get-moonbeam-binary.sh $MOONBEAM_LAST_CLIENT_TAG
- name: "Setup node"
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Copy tests folder
run: |
rm -rf tests tmp
mkdir tests tmp
git clone https://github.com/PureStake/moonbeam --depth 1 -b $MOONBEAM_GIT_REF tmp/moonbeam
cp -r tmp/moonbeam/moonbeam-types-bundle .
cp -r tmp/moonbeam/tests .
- name: Typescript tracing tests (against dev service)
continue-on-error: true
env:
ETHAPI_CMD: --ethapi=txpool,debug,trace
FORCE_WASM_EXECUTION: true
WASM_RUNTIME_OVERRIDES: moonbase-overrides
run: ./scripts/test-last-tracing-runtime.sh
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
# Ignore build directory populated by CI
build

# Ignore temporary files
# Ignore moonbeam test files
moonbeam-types-bundle
tests
tmp
9 changes: 9 additions & 0 deletions scripts/get-moonbeam-binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

CLIENT_TAG=$1
CLIENT_IMAGE="purestake/moonbeam:$CLIENT_TAG"

mkdir -p target/release
docker create -ti --name dummy $CLIENT_IMAGE bash
docker cp dummy:/moonbeam/moonbeam target/release/moonbeam
docker rm -f dummy
13 changes: 13 additions & 0 deletions scripts/test-last-tracing-runtime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

WASM_RUNTIME_OVERRIDES="moonbase-overrides"

chmod uog+x target/release/moonbeam
mkdir -p tests/$WASM_RUNTIME_OVERRIDES
cp wasm/moonbase-* tests/$WASM_RUNTIME_OVERRIDES
cd moonbeam-types-bundle
npm install
npm run build
cd ../tests
npm install
node_modules/.bin/mocha --parallel -j 1 -r ts-node/register 'tracing-tests/**/test-*.ts'