-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test smoketests * remove dir * check dirs * fix * fix * fix * fix * check * create dir * test * remove dir * cleanup * remove polkadot-sdk checkout * run start-services * add rust-src * test on Snowfork branch * complete e2e services test * remove extra sh * change to stable branch * bump * see whats cookin * adds dir * test * run tests * print out env * whoops * check var * see whats up * add things back * remove 0x from contract address * fix test * cleanup * remove comment * fix penpal * fix printed messages * revert cron time and switch to main branch
- Loading branch information
1 parent
84ce698
commit 2a03817
Showing
6 changed files
with
230 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: bridge | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
schedule: | ||
# Runs at 8:00 AM every day | ||
- cron: '0 8 * * *' | ||
|
||
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: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: snowfork/snowbridge | ||
ref: main | ||
- run: rm -rf polkadot-sdk | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: paritytech/polkadot-sdk | ||
ref: stable2409 | ||
path: ./polkadot-sdk | ||
- uses: arduino/setup-protoc@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- 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: polkadot-sdk dir | ||
run: echo "POLKADOT_SDK_DIR=./polkadot-sdk" >> $GITHUB_ENV | ||
- name: Create directories | ||
run: mkdir -p $OUTPUT_DIR && mkdir -p $LOG_DIR | ||
- 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: | | ||
nix develop -c sh -c ' | ||
./scripts/init-smoketests.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eux | ||
|
||
echo "Checkout lodestar" | ||
pushd .. | ||
if [ ! -d "lodestar" ]; then | ||
git clone https://github.com/ChainSafe/lodestar | ||
fi | ||
if [ ! -L "snowbridge/lodestar" ]; then | ||
(cd snowbridge && ln -sf ../lodestar lodestar) | ||
fi | ||
pushd lodestar | ||
git fetch && git checkout $LODESTAR_VERSION | ||
popd | ||
popd | ||
|
||
echo "Setting up git hooks" | ||
git config --local core.hooksPath hooks/ | ||
|
||
echo "Installing Rust nightly toolchain" | ||
rustup default stable | ||
rustup target add wasm32-unknown-unknown | ||
rustup component add rust-src | ||
rustup install --profile minimal $RUST_NIGHTLY_VERSION | ||
rustup component add --toolchain $RUST_NIGHTLY_VERSION rustfmt | ||
rustup show | ||
|
||
echo "Installing sszgen" | ||
go install github.com/ferranbt/fastssz/[email protected] | ||
|
||
echo "Installing cargo fuzz" | ||
cargo install cargo-fuzz | ||
|
||
echo "Installing web packages" | ||
(cd web && pnpm install) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters