-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into region-pallet
- Loading branch information
Showing
21 changed files
with
250 additions
and
115 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,2 @@ | ||
export POLKADOT_IMAGE=paritypr/polkadot-debug:v1.6.0 | ||
export REGIONX_IMAGE=szegoo/regionx-node:latest |
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
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,49 @@ | ||
name: Test coverage | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
TARPAULIN_VERSION: 0.27.3 | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: ./.github/actions/setup | ||
|
||
- name: Setup SSH | ||
uses: webfactory/ssh-agent@v0.5.3 | ||
with: | ||
ssh-private-key: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Use Git CLI for Cargo | ||
run: echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV | ||
|
||
- name: Run cargo-tarpaulin | ||
run: | | ||
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz | ||
tar -zxvf cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz -C $HOME/.cargo/bin | ||
cargo tarpaulin --workspace \ | ||
-e regionx-node regionx-runtime \ | ||
--exclude-files **/mock.rs **/weights/* \ | ||
--out xml | ||
- uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: RegionX-Labs/RegionX-Node |
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,29 @@ | ||
name: Dependency checks | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
|
||
- name: Install Rust | ||
run: cargo install --git https://github.com/paritytech/psvm psvm | ||
- name: Check Dependency Versions | ||
run: | | ||
chmod +x ./scripts/check-dependency-versions.sh | ||
./scripts/check-dependency-versions.sh |
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,42 @@ | ||
name: Smoke tests | ||
|
||
# Controls when the action will run. | ||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
smoke: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- uses: ./.github/actions/setup | ||
|
||
- name: Zombienet setup | ||
run: | | ||
wget https://github.com/paritytech/zombienet/releases/download/v1.3.100/zombienet-linux-x64 | ||
chmod +x zombienet-linux-x64 | ||
yes 2>/dev/null | ./zombienet-linux-x64 setup polkadot || true | ||
echo $GITHUB_WORKSPACE | ||
echo "PATH=$GITHUB_WORKSPACE:$PATH" >> $GITHUB_ENV | ||
echo $PATH | ||
- name: Pull Docker Image | ||
run: docker pull szegoo/regionx-node:latest | ||
|
||
- name: Compile regionx-node | ||
run: | | ||
cargo build --release | ||
cp ./target/release/regionx-node . | ||
- name: Run smoke test 0001 | ||
run: ./zombienet-linux-x64 -p native test ./zombienet_tests/0001-smoke-test.zndsl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
# The cache for docker container dependency | ||
/.cargo/config | ||
|
||
bin/ | ||
|
||
.DS_Store | ||
.idea | ||
.vscode |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM ubuntu:22.04 | ||
|
||
# show backtraces | ||
ENV RUST_BACKTRACE 1 | ||
|
||
RUN useradd -m -u 1000 -U -s /bin/sh -d /regionx regionx && \ | ||
mkdir /data && \ | ||
chown -R regionx:regionx /data | ||
|
||
ARG PROFILE=release | ||
|
||
# copy the compiled binary to the container | ||
COPY ./regionx-node /usr/bin/regionx-node | ||
|
||
USER regionx | ||
|
||
# check if executable works in this container | ||
RUN /usr/bin/regionx-node --version | ||
|
||
# ws_port | ||
EXPOSE 9333 9944 30333 30334 | ||
|
||
CMD ["/usr/bin/regionx-node"] |
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
Oops, something went wrong.