Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Smoke Tests in CI (#113)
Browse files Browse the repository at this point in the history
* test e2e scripts in GA

* fix GA

* test current dir

* fix path

* install moreutils

* sponge

* install go

* export path

* try something else

* run nix

* switch branch

* nix develop

* check setup

* use nix setup

* e2e stack script

* e2e stack script

* run command

* check current dir

* correct dir

* correct dir

* just cd

* try something else

* rn e2e script

* adds submodules

* ls

* print vars

* remove ls

* cd instead of pushdir

* try checking out differently

* ls

* ls

* change checkout order

* check what is in a dir

* check what is in a dir

* check something

* check something

* try something

* try something

* try e2e script again

* remove ls

* cleanup script

* adds ssz gen

* install js components

* install js components

* fix dir

* adds output dir

* create dir

* try something else

* bump

* fix config paths

* test output dir

* adds wasm target

* check wasm target

* setup rustup in nix

* missing quote

* install rustup stable

* adds e2e script in again

* remove skip wasm flag

* comment out things

* start lodestar

* print out log

* print out log

* print out lodestar

* check geth version

* bump

* remove commented out code

* update go files

* adds smoketests

* create dir

* adjust scripts

* only redirect start-services.sh output

* only redirect start-services.sh output

* switch dir

* permissions

* check script

* allow service to be down

* bump

* last run, hopefully

* fix tests

* fixes

* bump

* fix

* check lodestar

* check lodestar

* check lodestar

* bump

* bump

* try again

* try again

* bump

* bump

* update go

* update go

* cleanup

* check what is happening now

* lodestar should run the background

* run init.sh

* check what happens with the download

* change OS check

* remove other steps to see what is happening

* bump

* run smoketests

* run smoketests

* cleanup jobs

* extract ethereum chain id

* remove cargo.toml

* fix chain id data type

* fix missing chain id param

* fix missing chain id param

* fix coverage and missing param

* fix CI

* fix CI

* revert scripts

* revert coverage jobs

* revert formatting

* check log

* fix log

* separate steps

* cleanup job

* remove running smoketests on a PR, only when merged

* update branch

* remove http endpoint from relayer

* update nightly, revert unrelated changes

* check rust version

* chaneg branch for testing

* adds beacon relay log

* increase slot time

* increase block time check

* lower block check count

* only run smoketests on merge to snowbridge

---------

Co-authored-by: claravanstaden <Cats 4 life!>
  • Loading branch information
claravanstaden authored Mar 5, 2024
1 parent 628b251 commit e553417
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
RUST_BACKTRACE: 1
RUSTFLAGS: -C debuginfo=1
SKIP_WASM_BUILD: 1
RUST_NIGHTLY_VERSION: nightly-2023-05-23
RUST_NIGHTLY_VERSION: nightly-2023-12-28
steps:
- uses: actions/checkout@v2
with:
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/smoketest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: bridge

on:
push:
paths:
- "bridges/snowbridge/**"
- "!bridges/snowbridge/README.md"
- "!bridges/snowbridge/LICENSE"
branches:
- snowbridge
workflow_dispatch:

jobs:
smoketests:
runs-on: snowbridge-runner
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
RUSTFLAGS: -C debuginfo=1
outputs:
success: ${{ steps.run_e2e_stack.outcome == 'success' }}
steps:
- name: Set build directory environment variable
run: echo "OUTPUT_DIR=${GITHUB_WORKSPACE}/tmp" >> $GITHUB_ENV
- name: Set log directory environment variable
run: echo "LOG_DIR=${GITHUB_WORKSPACE}/log-tmp" >> $GITHUB_ENV
- name: Create directories
run: mkdir -p $OUTPUT_DIR && mkdir -p $LOG_DIR
- uses: actions/checkout@v2
with:
repository: snowfork/snowbridge
ref: smoketests-ci
path: snowbridge
submodules: "true"
- run: rm -f snowbridge/polkadot-sdk
- uses: actions/checkout@v2
with:
repository: snowfork/polkadot-sdk
ref: main
path: snowbridge/polkadot-sdk
- uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: run E2E stack
id: run_e2e_stack
run: |
cd snowbridge
nix develop -c sh -c '
./scripts/init.sh &&
cd web/packages/test &&
(./scripts/start-services.sh > "${{ env.LOG_DIR }}/start-services.log" 2>&1 &) &&
sleep 10 &&
./scripts/check-relayer.sh &&
./scripts/run-smoketests.sh'
continue-on-error: true
- name: Save start-services log file
uses: actions/upload-artifact@v3
with:
name: start-services.log
path: "${{ env.LOG_DIR }}/start-services.log"
- name: Save beacon-relay log file
uses: actions/upload-artifact@v3
with:
name: beacon-relay.log
path: "${{ env.OUTPUT_DIR }}/beacon-relay.log"
- run: ls
- name: check E2E test outcome
if: ${{ steps.run_e2e_stack.outcome != 'success' }}
run: |
echo "E2E tests failed"
exit 1

0 comments on commit e553417

Please sign in to comment.