Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Dec 23, 2021
1 parent 06d4e87 commit 39511be
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
38 changes: 38 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: "elois-test-overrides"
MOONBEAM_LAST_CLIENT_TAG: "sha-f996ad83"

jobs:

list-spec-versions:
Expand Down Expand Up @@ -101,3 +105,37 @@ 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 -b $MOONBEAM_GIT_REF tmp/moonbeam
cp -r tmp/moonbeam/tests tests
- name: Typescript tracing tests (against dev service)
env:
ETHAPI_CMD: --ethapi=txpool,debug,trace
WASM_RUNTIME_OVERRIDES: tests/moonbase-overrides
run:
mkdir -p tests/moonbase-overrides/
cp wasm/moonbase-* tests/moonbase-overrides/
cd tests
npm install
node_modules/.bin/mocha --parallel -j 2 -r ts-node/register 'tracing-tests/**/test-*.ts'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ build

# Ignore temporary files
tmp
tests
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

0 comments on commit 39511be

Please sign in to comment.