Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update the CI to use paritytech/ci-linux:production #73

Merged
merged 4 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 24 additions & 26 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
run: SKIP_WASM_BUILD=1 cargo test --locked
6 changes: 1 addition & 5 deletions pallets/funding/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5938,10 +5938,7 @@ mod funding_end {
assert_eq!(finished_project.get_project_details().status, ProjectStatus::FundingSuccessful);
test_env.advance_time(<TestRuntime as Config>::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();
Expand Down Expand Up @@ -6497,5 +6494,4 @@ mod testing_macros {
};
}
pub(crate) use extract_from_event;

}