Skip to content

Commit

Permalink
merge master & resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Imod7 committed Jan 16, 2025
2 parents c9cf371 + 194f3e7 commit c218362
Show file tree
Hide file tree
Showing 586 changed files with 106,982 additions and 2,428 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ updates:
include: "scope"
labels:
- "D0 - Dependencies"
versioning-strategy: increase
68 changes: 68 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Benchmark

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
environment: master_n_tags
container:
image: paritytech/node-wrk:latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: benchmarks
run: |
yarn --immutable
echo "Benchmarks for polkadot"
mkdir -p artifacts
yarn bench --log-level info --ws-url wss://rpc.polkadot.io
mv benchmarks.txt artifacts/
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: benchmarks
path: ./artifacts/

benchmark-publish:
name: benchmark publish
runs-on: ubuntu-latest
needs: [benchmark]
environment: master_n_tags
steps:
- name: Checkout sources
uses: actions/checkout@v4

- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.GH_APP_SAS_APP_ID }}
private-key: ${{ secrets.GH_APP_SAS_APP_KEY }}

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: benchmarks
path: artifacts

- name: Modify benches result for benhcmark action
run: ./scripts/ci/benchmarks/generate_benchmark_result.sh artifacts/benchmarks.txt > artifacts/benchmarks.json

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 #1.20.4
with:
tool: "customSmallerIsBetter"
output-file-path: artifacts/benchmarks.json
# Push and deploy GitHub pages branch automatically
auto-push: true
github-token: ${{ steps.app-token.outputs.token }}
10 changes: 7 additions & 3 deletions .github/workflows/calc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: calc

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand All @@ -22,7 +26,7 @@ jobs:
toolchain: stable

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7

- name: Cargo test
uses: actions-rs/[email protected]
Expand Down
104 changes: 60 additions & 44 deletions .github/workflows/pr.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
# The type of runner that the job will run on
Expand All @@ -21,7 +25,7 @@ jobs:
- name: Install Node v18
uses: actions/setup-node@v4
with:
node-version: '18.14'
node-version: "18.14"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -41,7 +45,7 @@ jobs:
- name: Linter.
run: yarn lint
tests:
# The type of runner that the job will run on
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
Expand All @@ -51,7 +55,7 @@ jobs:
- name: Install Node v18
uses: actions/setup-node@v4
with:
node-version: '18.14'
node-version: "18.14"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -82,7 +86,7 @@ jobs:
- name: Install Node v18
uses: actions/setup-node@v4
with:
node-version: '18.14'
node-version: "18.14"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -102,55 +106,67 @@ jobs:
- name: Build
run: yarn build

build-docs:
# The type of runner that the job will run on
build-npm-release:
# This test is to make sure sidecar can release a binary without any errors.
# This script does not publish a release, but instead uses yarn to create a tarball and
# install it locally. Once installed a binary is attached to sidecars node_modules, and that
# binary is then tested against. For more in depth information reference the docs at
# `../../scripts/README.md`.

runs-on: ubuntu-latest

steps:
- name: Checkout files
uses: actions/checkout@v4
strategy:
matrix:
node-version: [18.x]

- name: Install Node v18
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '18.14'
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test:test-release

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
build_docker:
name: Build docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Build Docker image
uses: docker/[email protected]
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install JS dependencies
run: yarn install

- name: Build Docs
run: yarn build:docs

build-npm-release:
# This test is to make sure sidecar can release a binary without any errors.
# This script does not publish a release, but instead uses yarn to create a tarball and
# install it locally. Once installed a binary is attached to sidecars node_modules, and that
# binary is then tested against. For more in depth information reference the docs at
# `../../scripts/README.md`.

context: .
file: ./Dockerfile
push: false
tags: |
docker.io/parity/substrate-api-sidecar:latest
e2e:
name: e2e
runs-on: ubuntu-latest

container:
image: node:18
strategy:
matrix:
node-version: [18.x]

include:
- chain-name: westend
chain-url: wss://westend-rpc.polkadot.io
- chain-name: kusama
chain-url: wss://apps-kusama-rpc.polkadot.io
- chain-name: polkadot
chain-url: wss://apps-rpc.polkadot.io
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test:test-release
- name: Checkout sources
uses: actions/checkout@v4

- name: e2e tests
run: |
yarn --immutable
echo "Tests for ${{ matrix.chain-name }}"
yarn test:latest-e2e-tests --log-level info --chain ${{ matrix.chain-name }} --local ${{ matrix.chain-url }}
Loading

0 comments on commit c218362

Please sign in to comment.