-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
586 changed files
with
106,982 additions
and
2,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ updates: | |
include: "scope" | ||
labels: | ||
- "D0 - Dependencies" | ||
versioning-strategy: increase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 }} |
Oops, something went wrong.