Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 16, 2024
1 parent a6f4674 commit e4d4b95
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Basic
on:
pull_request:
branches:
- main
- main
push:
branches:
- main
- main
workflow_dispatch:

jobs:
Expand All @@ -16,19 +16,15 @@ jobs:
cache-key: ${{ steps.cache-key.outputs.key }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup

- name: Generate cache key
id: cache-key
run: echo "::set-output name=key::${{ runner.os }}-$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)"

- uses: Swatinem/rust-cache@v2
with:
key: ${{ steps.cache-key.outputs.key }}
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
Expand All @@ -39,16 +35,24 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Rust environment
run: |
source $HOME/.cargo/env
rustup default nightly
- name: Cargo fmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

lint-and-check:
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: Cargo clippy
run: cargo +nightly clippy -- -D warnings
run: cargo clippy -- -D warnings
- name: Check Code
run: cargo check

Expand All @@ -60,13 +64,17 @@ jobs:
- name: Check Dependency Versions
run: |
chmod +x ./scripts/check-dependency-versions.sh
./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:
Expand All @@ -88,18 +96,15 @@ jobs:
- 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

0 comments on commit e4d4b95

Please sign in to comment.