-
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.
- Loading branch information
Showing
1 changed file
with
17 additions
and
12 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 |
---|---|---|
|
@@ -3,10 +3,10 @@ name: Basic | |
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- main | ||
push: | ||
branches: | ||
- main | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
||
|
@@ -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: | ||
|
@@ -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 |