difftreelog
Fixing spoted items.
in: master
5 files changed
.docker/Dockerfile-parachaindiffbeforeafterboth1# ===== Rust builder =====2FROM ubuntu:20.04 as rust-builder3LABEL maintainer="Unique.Network"45ARG RUST_TOOLCHAIN=nightly-2022-05-1167ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN8ENV CARGO_HOME="/cargo-home"9ENV PATH="/cargo-home/bin:$PATH"1011RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none1213RUN apt-get update && \14 apt-get install -y cmake pkg-config libssl-dev git clang && \15 apt-get clean && \16 rm -r /var/lib/apt/lists/*1718RUN rustup toolchain uninstall $(rustup toolchain list) && \19 rustup toolchain install $RUST_TOOLCHAIN && \20 rustup default $RUST_TOOLCHAIN && \21 rustup target list --installed && \22 rustup show23RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN242526RUN mkdir unique_parachain27WORKDIR /unique_parachain2829# ===== BUILD ======30FROM rust-builder as builder-unique3132ARG PROFILE=release33ARG FEATURE=3435RUN mkdir unique_parachain36WORKDIR /unique_parachain3738RUN git clone $REPO_URL -b $BRANCH39RUN cargo build $FEATURE --$PROFILE40 # && \41 # cargo test4243# ===== BUILD POLKADOT =====44FROM rust-builder as builder-polkadot4546ARG POLKA_VERSION=release-v0.9.2447ENV POLKA_VERSION $POLKA_VERSION4849RUN mkdir unique_parachain50WORKDIR /unique_parachain5152RUN git clone -b $POLKA_VERSION --depth 1 https://github.com/paritytech/polkadot.git && \53 cd polkadot && \54 cargo build --release5556# ===== RUN ======5758FROM ubuntu:20.045960RUN apt-get -y update && \61 apt-get -y upgrade && \62 apt-get -y install curl git && \63 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \64 export NVM_DIR="$HOME/.nvm" && \65 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \66 nvm install v16.16.0 && \67 nvm use v16.16.06869RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/runtime-upgrade-testing7071RUN export NVM_DIR="$HOME/.nvm" && \72 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \73 cd /polkadot-launch && \74 npm install --global yarn && \75 yarn install7677COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/78COPY --from=builder-polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/7980COPY ["./launch-config.json", "/polkadot-launch/launch-config.json"]818283CMD export NVM_DIR="$HOME/.nvm" && \84 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \85 cd /polkadot-launch && \86 yarn start launch-config.json1# ===== Rust builder =====2FROM ubuntu:20.04 as rust-builder3LABEL maintainer="Unique.Network"45ARG RUST_TOOLCHAIN=nightly-2022-05-1167ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN8ENV CARGO_HOME="/cargo-home"9ENV PATH="/cargo-home/bin:$PATH"1011RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none1213RUN apt-get update && \14 apt-get install -y cmake pkg-config libssl-dev git clang && \15 apt-get clean && \16 rm -r /var/lib/apt/lists/*1718RUN rustup toolchain uninstall $(rustup toolchain list) && \19 rustup toolchain install $RUST_TOOLCHAIN && \20 rustup default $RUST_TOOLCHAIN && \21 rustup target list --installed && \22 rustup show23RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN242526RUN mkdir /unique_parachain27WORKDIR /unique_parachain2829# ===== BUILD ======30FROM rust-builder as builder-unique3132ARG PROFILE=release33ARG FEATURE=3435RUN mkdir /unique_parachain36WORKDIR /unique_parachain3738RUN git clone $REPO_URL -b $BRANCH39RUN cargo build $FEATURE --$PROFILE4041# ===== BUILD POLKADOT =====42FROM rust-builder as builder-polkadot4344ARG POLKA_VERSION=release-v0.9.2445ENV POLKA_VERSION $POLKA_VERSION4647RUN mkdir /unique_parachain48WORKDIR /unique_parachain4950RUN git clone -b $POLKA_VERSION --depth 1 https://github.com/paritytech/polkadot.git && \51 cd polkadot && \52 cargo build --release5354# ===== RUN ======5556FROM ubuntu:20.045758RUN apt-get -y update && \59 apt-get -y upgrade && \60 apt-get -y install curl git && \61 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \62 export NVM_DIR="$HOME/.nvm" && \63 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \64 nvm install v16.16.0 && \65 nvm use v16.16.06667RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/runtime-upgrade-testing6869RUN export NVM_DIR="$HOME/.nvm" && \70 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \71 cd /polkadot-launch && \72 npm install --global yarn && \73 yarn install7475COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/76COPY --from=builder-polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/7778COPY --from=builder-unique /unique_parachain/launch-config.json /polkadot-launch/launch-config.json798081CMD export NVM_DIR="$HOME/.nvm" && \82 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \83 cd /polkadot-launch && \84 yarn start launch-config.json.github/workflows/codestyle.ymldiffbeforeafterboth--- a/.github/workflows/codestyle.yml
+++ b/.github/workflows/codestyle.yml
@@ -14,6 +14,24 @@
runs-on: self-hosted-ci
steps:
+ - name: Skip if pull request is in Draft
+ # `if: github.event.pull_request.draft == true` should be kept here, at
+ # the step level, rather than at the job level. The latter is not
+ # recommended because when the PR is moved from "Draft" to "Ready to
+ # review" the workflow will immediately be passing (since it was skipped),
+ # even though it hasn't actually ran, since it takes a few seconds for
+ # the workflow to start. This is also disclosed in:
+ # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
+ # That scenario would open an opportunity for the check to be bypassed:
+ # 1. Get your PR approved
+ # 2. Move it to Draft
+ # 3. Push whatever commits you want
+ # 4. Move it to "Ready for review"; now the workflow is passing (it was
+ # skipped) and "Check reviews" is also passing (it won't be updated
+ # until the workflow is finished)
+ if: github.event.pull_request.draft == true
+ run: exit 1
+
- uses: actions/checkout@v1
- name: Install latest nightly
uses: actions-rs/toolchain@v1
@@ -30,6 +48,24 @@
runs-on: self-hosted-ci
steps:
+ - name: Skip if pull request is in Draft
+ # `if: github.event.pull_request.draft == true` should be kept here, at
+ # the step level, rather than at the job level. The latter is not
+ # recommended because when the PR is moved from "Draft" to "Ready to
+ # review" the workflow will immediately be passing (since it was skipped),
+ # even though it hasn't actually ran, since it takes a few seconds for
+ # the workflow to start. This is also disclosed in:
+ # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
+ # That scenario would open an opportunity for the check to be bypassed:
+ # 1. Get your PR approved
+ # 2. Move it to Draft
+ # 3. Push whatever commits you want
+ # 4. Move it to "Ready for review"; now the workflow is passing (it was
+ # skipped) and "Check reviews" is also passing (it won't be updated
+ # until the workflow is finished)
+ if: github.event.pull_request.draft == true
+ run: exit 1
+
- uses: actions/checkout@v3
- name: Install substrate dependencies
run: sudo apt-get install libssl-dev pkg-config libclang-dev clang
.github/workflows/node_build_test.ymldiffbeforeafterboth--- a/.github/workflows/node_build_test.yml
+++ b/.github/workflows/node_build_test.yml
@@ -74,7 +74,7 @@
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
POLKA_VERSION=${{ env.POLKA_VERSION }}
FEATURE=${{ matrix.features }}
- BRANCH=${{ github.head_ref }}
+ BRANCH=${{ github.event.pull_request.head.sha }}
- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml
@@ -91,7 +91,6 @@
cd tests
yarn install
yarn add mochawesome
- yarn --pure-lockfile
echo "Ready to start tests"
node scripts/readyness.js
NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
.github/workflows/tests_codestyle.ymldiffbeforeafterboth--- a/.github/workflows/tests_codestyle.yml
+++ b/.github/workflows/tests_codestyle.yml
@@ -13,13 +13,31 @@
runs-on: self-hosted-ci
steps:
- - uses: actions/checkout@v3
-
- - uses: actions/setup-node@v3
- with:
- node-version: 16
+ - name: Skip if pull request is in Draft
+ # `if: github.event.pull_request.draft == true` should be kept here, at
+ # the step level, rather than at the job level. The latter is not
+ # recommended because when the PR is moved from "Draft" to "Ready to
+ # review" the workflow will immediately be passing (since it was skipped),
+ # even though it hasn't actually ran, since it takes a few seconds for
+ # the workflow to start. This is also disclosed in:
+ # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
+ # That scenario would open an opportunity for the check to be bypassed:
+ # 1. Get your PR approved
+ # 2. Move it to Draft
+ # 3. Push whatever commits you want
+ # 4. Move it to "Ready for review"; now the workflow is passing (it was
+ # skipped) and "Check reviews" is also passing (it won't be updated
+ # until the workflow is finished)
+ if: github.event.pull_request.draft == true
+ run: exit 1
+
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
- - name: Install modules
- run: cd tests && yarn
- - name: Run ESLint
- run: cd tests && yarn eslint --ext .ts,.js src/
+ - name: Install modules
+ run: cd tests && yarn
+ - name: Run ESLint
+ run: cd tests && yarn eslint --ext .ts,.js src/
tests/scripts/readyness.jsdiffbeforeafterboth--- a/tests/scripts/readyness.js
+++ b/tests/scripts/readyness.js
@@ -24,7 +24,7 @@
break;
}
catch(e) {
- await sleep(60000);
+ await sleep(10000);
}
}
}