Skip to content

Commit

Permalink
wip: revert me pls after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vklachkov committed Jan 18, 2025
1 parent a1602b2 commit 687d612
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 197 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
@@ -1,71 +0,0 @@
# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing
# Nested workflow for checks related to formatting Rust code

name: codestyle

# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:

jobs:
rustfmt:
runs-on: [ ci ]
steps:
- name: Clean Workspace
uses: AutoModality/[email protected]
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: Read .env file
uses: xom9ikk/[email protected]
- name: Install toolchain version from .env
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt -- --check # In that mode it returns only exit code.
- name: Cargo fmt state
if: success()
run: echo "Nothing to do. Command 'cargo fmt -- --check' returned exit code 0."

yarn_eslint:
runs-on: [ ci ]
steps:
- name: Clean Workspace
uses: AutoModality/[email protected]
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- uses: actions/[email protected]
with:
node-version: 20
- name: Install modules
run: cd js-packages && yarn
- name: Run ESLint
# run: cd js-packages && yarn lint --max-warnings=0
run: cd js-packages && yarn lint

clippy:
runs-on: [ ci ]
steps:
- name: Clean Workspace
uses: AutoModality/[email protected]
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: Install substrate dependencies
run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler
- name: Read .env file
uses: xom9ikk/[email protected]
- name: Install toolchain version from .env
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run cargo check
run: cargo clippy --features=quartz-runtime,unique-runtime,try-runtime --tests -- -Dwarnings
env:
SKIP_WASM_BUILD: '1'
19 changes: 15 additions & 4 deletions .github/workflows/main-process-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
id: create_matrix
with:
matrix: |
#network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, fork_source {${{ env.OPAL_REPLICA_FROM }}}
#network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, fork_source {${{ env.QUARTZ_REPLICA_FROM }}}
network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, fork_source {${{ env.UNIQUE_REPLICA_FROM }}}
main-process:
Expand Down Expand Up @@ -262,8 +260,21 @@ jobs:
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: "Debug: Tmate session"
uses: mxschmitt/action-tmate@v3
# - name: "Debug: Tmate session"
# uses: mxschmitt/action-tmate@v3

- name: "Debug: Run several tests after upgrade"
working-directory: js-packages/tests
if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
run: |
yarn testParallel --grep 'decimals' || true
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: "Debug: wait 10 blocks for runtime"
if: ${{ !cancelled() && steps.reconcile2.outcome == 'success' }}
run: |
sleep 60
- name: Run Parallel tests after upgrade
working-directory: js-packages/tests
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/yarn-dev.yml
Original file line number Diff line number Diff line change
@@ -1,122 +0,0 @@
# Integration test in --dev mode
# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests
name: yarn-dev

# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

dev_build_int_tests:
# The type of runner that the job will run on
runs-on: [ ci ]
timeout-minutes: 1380

name: ${{ matrix.network }}

continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.

strategy:
matrix:
include:
- network: "opal"
- network: "quartz"
- network: "unique"

steps:
- name: Clean Workspace
uses: AutoModality/[email protected]

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }} #Checking out head commit

- name: Read .env file
uses: xom9ikk/[email protected]

- name: Generate ENV related extend file for docker-compose
uses: cuchi/[email protected]
with:
template: .docker/docker-compose.tmp-dev.j2
output_file: .docker/docker-compose.${{ matrix.network }}.yml
variables: |
NETWORK=${{ matrix.network }}
- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml

- name: Build the stack
run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans

- uses: actions/[email protected]
with:
node-version: 20

- name: Run tests
working-directory: js-packages/tests
run: |
yarn install
yarn add mochawesome
../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
RPC_URL: http://127.0.0.1:9944/

- name: Test Report
uses: phoenix-actions/test-reporting@v15
id: test-report
if: success() || failure() # run this step even if previous step failed
with:
name: int test results - ${{ matrix.network }} # Name of the check run which will be created
path: js-packages/tests/mochawesome-report/test-*.json # Path to test results
reporter: mochawesome-json
fail-on-error: 'false'

- name: Read output variables
run: |
echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
- name: Run benchmark mintFee tests
working-directory: js-packages/scripts
run: |
yarn install
node --no-warnings=ExperimentalWarning --loader ts-node/esm ./benchmarks/mintFee/index.ts
- name: Run benchmark opsFee tests
working-directory: js-packages/scripts
run: |
yarn install
node --no-warnings=ExperimentalWarning --loader ts-node/esm ./benchmarks/opsFee/index.ts
- name: Stop running containers
if: always() # run this step always
run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down

- name: Remove builder cache
if: always() # run this step always
run: |
docker builder prune -f -a
docker system prune -f
docker image prune -f -a
# check:
# if: always()
# runs-on: [ ci ]
# needs:
# - dev_build_int_tests

# steps:
# - name: Install python3
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'

# - name: Decide whether the needed jobs succeeded or failed
# uses: re-actors/[email protected]
# with:
# jobs: ${{ toJSON(needs) }}

0 comments on commit 687d612

Please sign in to comment.