Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 16, 2024
1 parent e4d4b95 commit f5358cf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 57 deletions.
58 changes: 1 addition & 57 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ github.event.pull_request.head.repo.default_branch }}-
${{ runner.os }}-
- name: Setup common environment
run: |
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
cargo install --git https://github.com/paritytech/psvm psvm
fmt:
needs: prepare
Expand All @@ -51,60 +47,8 @@ jobs:
run: |
source $HOME/.cargo/env
rustup default nightly
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
- name: Cargo clippy
run: cargo clippy -- -D warnings
- name: Check Code
run: cargo check

check-dependencies:
needs: prepare
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Check Dependency Versions
run: |
chmod +x ./scripts/check-dependency-versions.sh
./scripts/check-dependency-versions.sh
code_coverage:
needs: prepare
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Rust environment
run: |
source $HOME/.cargo/env
rustup default nightly
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: "0.21.0"
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Archive code coverage results
uses: actions/[email protected]
with:
name: code-coverage-report
path: cobertura.xml

block-production:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- 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
echo "PATH=$GITHUB_WORKSPACE:$PATH" >> $GITHUB_ENV
- 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
25 changes: 25 additions & 0 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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:

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
37 changes: 37 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Smoke tests

# Controls when the action will run.
on:
workflow_dispatch:

jobs:
smoke:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- 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

0 comments on commit f5358cf

Please sign in to comment.