Skip to content

build(deps): bump the version-updates group across 1 directory with 65 updates #10358

build(deps): bump the version-updates group across 1 directory with 65 updates

build(deps): bump the version-updates group across 1 directory with 65 updates #10358

Workflow file for this run

name: CI
on:
# Enable option to manually run the action:
workflow_dispatch:
# Run on PRs that target `main` it:
pull_request:
branches:
- main
# Run the pipeline for each PR part of merge queues as well
merge_group:
# Automatically cancel any in-progress workflow runs from earlier commits
# on the same branch or pull request (e.g., after a force push)
concurrency:
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DFCG_ARTIFACTS_ACCESS_TOKEN: ${{ secrets.DFCG_ARTIFACTS_ACCESS_TOKEN }}
CMC_API_KEY: ${{ secrets.CMC_API_KEY }}
APCA_API_KEY_ID: ${{ secrets.APCA_API_KEY_ID }}
APCA_API_SECRET_KEY: ${{ secrets.APCA_API_SECRET_KEY }}
ALPHAVANTAGE_API_KEY: ${{ secrets.ALPHAVANTAGE_API_KEY }}
YAHOO_FINANCE_API_KEY: ${{ secrets.YAHOO_FINANCE_API_KEY }}
TWELVEDATA_API_KEY: ${{ secrets.TWELVEDATA_API_KEY }}
FMP_API_KEY: ${{ secrets.FMP_API_KEY }}
SPOUT_RWA_API_KEY: ${{ secrets.SPOUT_RWA_API_KEY }}
RPC_URL_ETHEREUM_SEPOLIA: ${{ secrets.RPC_URL_ETHEREUM_SEPOLIA }}
RPC_URL_INK_SEPOLIA: ${{ secrets.RPC_URL_INK_SEPOLIA }}
METALS_API_KEY: ${{ secrets.METALS_API_KEY }}
jobs:
lint:
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Check formatting
run: nix develop --impure .#pre-commit -c sh -c 'yarn && pre-commit run --all-files'
- name: nix flake check
run: nix flake check --impure
build-and-test-ts-libs-and-apps:
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build & activate the Nix Dev Shell
run: |
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.js || echo exit 1)"
env >> "$GITHUB_ENV"
- name: Install JS deps
run: yarn install
- name: Build all packages
run: just build-ts
- name: Test all packages
run: just test-ts
decoders-tests:
timeout-minutes: 20
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build & activate the Nix Dev Shell
run: |
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.js || echo exit 1)"
env >> "$GITHUB_ENV"
- name: Install JS deps
run: yarn install
- name: Build all contracts
run: yarn build:recursive @blocksense/decoders
- name: Test all contracts
run: |
yarn workspace @blocksense/decoders test
yarn workspace @blocksense/decoders test:paris
e2e-tests:
timeout-minutes: 10
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build & activate the Nix Dev Shell
run: |
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.default || echo exit 1)"
env >> "$GITHUB_ENV"
- name: Install JS deps
run: yarn install
- name: Build @blocksense/e2e-tests
run: yarn build:recursive @blocksense/e2e-tests
- name: Start e2e tests
run: just test-e2e
smart-contracts-tests:
timeout-minutes: 360
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build & activate the Nix Dev Shell
run: |
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.js || echo exit 1)"
env >> "$GITHUB_ENV"
- name: Install JS deps
run: yarn install
- name: Build all contracts
run: yarn build:recursive @blocksense/contracts
- name: Test all contracts
run: yarn workspace @blocksense/contracts test
- name: Measure test coverage
run: yarn workspace @blocksense/contracts coverage
- name: Measure contract size
run: yarn workspace @blocksense/contracts size
set-runner-system-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set.outputs.matrix }}
steps:
- id: set
name: Set Runner Matrix
run: |
if [[ "${{ github.event_name }}" == "merge_group" ]]; then
echo 'matrix={"include":[' \
'{"runner":["self-hosted","nixos","x86-64-v3","bare-metal"],"system":"x86_64-linux"},' \
'{"runner":"macos-latest-xlarge","system":"aarch64-darwin"}' \
']}' >> $GITHUB_OUTPUT
else
echo 'matrix={"include":[' \
'{"runner":["self-hosted","nixos","x86-64-v3","bare-metal"],"system":"x86_64-linux"}' \
']}' >> $GITHUB_OUTPUT
fi
build-nix-environments-and-push-to-cachix:
name: Build Nix Environments and push to Cachix
needs: set-runner-system-matrix
timeout-minutes: 60
strategy:
matrix: ${{ fromJson(needs.set-runner-system-matrix.outputs.matrix) }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build Nix Environments and push to Cachix
run: |
nix build --impure -L --print-out-paths \
.#{spin,spinWrapped,process-compose-environments.hermetic.all,process-compose-environments.with-local-cargo-artifacts.all,devShells.${{ matrix.system }}.default} | \
cachix push blocksense
rust:
timeout-minutes: 360
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build & activate the Nix Dev Shell
run: |
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.default || echo exit 1)"
env >> "$GITHUB_ENV"
- name: Build Rust workspace
run: cargo build
- name: Test Rust workspace
run: cargo test
deploy_websites:
name: Deploy ${{ matrix.project }} website
timeout-minutes: 360
runs-on: [self-hosted, nixos, x86-64-v3, bare-metal]
strategy:
matrix:
include:
- project: docs.blocksense.network
path: apps/docs.blocksense.network/dist
project_name: blocksense-docs
build_command: |
yarn workspace @blocksense/docs.blocksense.network build:with-deps &&
yarn workspace @blocksense/docs.blocksense.network test:network-icons
- project: docs-ui.blocksense.network
path: libs/ts/docs-ui/storybook-static
project_name: blocksense-docs-ui
build_command: yarn workspace @blocksense/docs-ui build-storybook
- project: ui.blocksense.network
path: libs/ts/ui/storybook-static
project_name: blocksense-ui
build_command: yarn workspace @blocksense/ui build-storybook
outputs:
docsDeploymentMessage: ${{ steps.docs-ws-url.outputs.url }}
docsUiDeploymentMessage: ${{ steps.docs-ui-ws-url.outputs.url }}
uiDeploymentMessage: ${{ steps.ui-ws-url.outputs.url }}
steps:
- uses: actions/checkout@v6
- name: Install Nix
uses: metacraft-labs/nixos-modules/.github/install-nix@main
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachix-cache: ${{ vars.CACHIX_CACHE }}
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
substituters: ${{ vars.SUBSTITUTERS }}
- name: Build & activate the Nix Dev Shell
run: |
eval "$(nix print-dev-env --accept-flake-config --impure .#devShells.x86_64-linux.js || echo exit 1)"
env >> "$GITHUB_ENV"
- name: Install JS deps
run: yarn install
- name: Build
id: build
run: ${{ matrix.build_command }}
- name: Deploy Website
id: deploy-website
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: |
pages deploy ${{ matrix.path }} --project-name=${{ matrix.project_name }}
#TODO(EmilIvanichkovv): Migrate this to the matrix
- name: Collect Docs Deployment URL
id: docs-ws-url
if: matrix.project == 'docs.blocksense.network'
env:
DOCS_DEPLOY_URL: ${{ steps.deploy-website.outputs.deployment-url }}
NEXT_PUBLIC_VERIFICATION_API_KEY: ${{ secrets.NEXT_PUBLIC_VERIFICATION_API_KEY }}
NEXT_PUBLIC_VERIFICATION_API_URL: ${{ secrets.NEXT_PUBLIC_VERIFICATION_API_URL }}
run: |
echo "url=$DOCS_DEPLOY_URL" >> $GITHUB_OUTPUT
- name: Collect Docs UI Deployment URL
id: docs-ui-ws-url
if: matrix.project == 'docs-ui.blocksense.network'
env:
DOCS_UI_DEPLOY_URL: ${{ steps.deploy-website.outputs.deployment-url }}
run: |
echo "url=$DOCS_UI_DEPLOY_URL" >> $GITHUB_OUTPUT
- name: Collect UI Deployment URL
id: ui-ws-url
if: matrix.project == 'ui.blocksense.network'
env:
UI_DEPLOY_URL: ${{ steps.deploy-website.outputs.deployment-url }}
run: |
echo "url=$UI_DEPLOY_URL" >> $GITHUB_OUTPUT
comment_on_pr:
needs: [deploy_websites]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Get current date and time
id: datetime
run: |
echo "latest_update=$(date +'%d.%m.%Y %H:%M:%S')" >> $GITHUB_OUTPUT
- name: Comment Deployment Links on the PR
uses: marocchino/sticky-pull-request-comment@v2.9.4
with:
recreate: true
message: |
### 🚀 Deployment Links of Blocksense Network websites:
| Website | Latest Update | Commit |
|---------------------|----------|----------------------------------------------------------------------|
| 🌱 [Documentation](${{ needs.deploy_websites.outputs.docsDeploymentMessage }}) | ${{ steps.datetime.outputs.latest_update }} | ${{ github.sha }} |
| 📖 [Docs UI Components](${{ needs.deploy_websites.outputs.docsUiDeploymentMessage }}) | ${{ steps.datetime.outputs.latest_update }} | ${{ github.sha }} |
| 📝 [UI Components](${{ needs.deploy_websites.outputs.uiDeploymentMessage }}) | ${{ steps.datetime.outputs.latest_update }} | ${{ github.sha }} |