diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c501dd656..e986300c9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -4,7 +4,7 @@ name: Check Set-Up & Build on: pull_request: branches: [main] - types: [ready_for_review, labeled] + types: [synchronize, reopened, ready_for_review, labeled] label: types: [created, deleted] # Allows you to run this workflow manually from the Actions tab @@ -15,46 +15,44 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - check: + fmt: # The type of runner that the job will run on runs-on: ubuntu-22.04 + container: + image: paritytech/ci-linux:production # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - name: Set-Up - run: sudo apt update && sudo apt install -y protobuf-compiler clang - - - name: Install Rust - # Using the version specified in the rust-toolchain.toml - uses: actions-rust-lang/setup-rust-toolchain@v1 - # Fail fast: check formatting first as it doesn't require compilation - - name: Check formatting - run: cargo fmt --all --check - - - name: Check Build Parachain Runtime - run: | - SKIP_WASM_BUILD=1 cargo check --release -p polimec-parachain-runtime + - name: Check the formatting + run: cargo +nightly fmt --all --check test: - # This job runs only if `check` is successful - needs: check # The type of runner that the job will run on + needs: check runs-on: ubuntu-22.04 + container: + image: paritytech/ci-linux:production # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - + # Required by actions/cache@v3 - name: Set-Up - run: sudo apt update && sudo apt install -y protobuf-compiler clang + run: apt update && apt install -y nodejs - - name: Install Rust - # Using the version specified in the rust-toolchain.toml - uses: actions-rust-lang/setup-rust-toolchain@v1 + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Test the Parachain - run: | - SKIP_WASM_BUILD=1 cargo test --release \ No newline at end of file + run: SKIP_WASM_BUILD=1 cargo test --locked \ No newline at end of file diff --git a/pallets/funding/src/tests.rs b/pallets/funding/src/tests.rs index 89cea64cd..f32f0b4d0 100644 --- a/pallets/funding/src/tests.rs +++ b/pallets/funding/src/tests.rs @@ -5938,10 +5938,7 @@ mod funding_end { assert_eq!(finished_project.get_project_details().status, ProjectStatus::FundingSuccessful); test_env.advance_time(::SuccessToSettlementTime::get()).unwrap(); - assert_matches!( - finished_project.get_project_details().cleanup, - Cleaner::Success(CleanerState::Initialized(_)) - ); + assert_matches!(finished_project.get_project_details().cleanup, Cleaner::Success(CleanerState::Initialized(_))); test_ct_created_for(&test_env, project_id); test_env.advance_time(10u64).unwrap(); @@ -6497,5 +6494,4 @@ mod testing_macros { }; } pub(crate) use extract_from_event; - }