Skip to content

chore: update tests and deps #3

chore: update tests and deps

chore: update tests and deps #3

Workflow file for this run

name: Pre-release sdk
on:
push:
branches:
- 'rc/sdk/*'
paths:
- packages/sdk/**
env:
API_URL: "ws://127.0.0.1:9947"
TX_VERBOSE: true
permissions:
contents: write
id-token: write
deployments: write
checks: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- name: Clone mangata node repository
uses: actions/checkout@v3
with:
repository: mangata-finance/mangata-node
path: mangata-repo
ref: develop
- name: Setup Node version and cache dependencies
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
- name: Install WASM toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
- name: Replace parachain docker image reference in config
working-directory: mangata-repo/devops/parachain-launch
run: sed -i 's+mangatasolutions/mangata-node:.*+mangatasolutions/mangata-node:develop-fast+g' config.yml
- name: Generate the config
working-directory: mangata-repo/devops/parachain-launch
run: npx @open-web3/parachain-launch generate config.yml
- name: Remove obsolete node run args from generated docker-compose.yml
working-directory: mangata-repo/devops/parachain-launch/output
run: sed -i '/ws-external/d' docker-compose.yml
- name: Run the Node
working-directory: mangata-repo/devops/parachain-launch/output
run: |
docker-compose up -d --build
docker ps
- name: Sleep for 3 minutes
run: sleep 180s
- name: Extract peerDependencies
id: extract
working-directory: packages/sdk
run: |
peerDependencies=$(cat package.json | jq -r '.peerDependencies | to_entries | map(.key + "@" + .value) | join(",")')
echo "PEER_DEPENDENCIES=$peerDependencies" >> $GITHUB_ENV
- run: npm ci
- run: npx nx run @mangata-finance/sdk:lint
- run: npx nx run @mangata-finance/sdk:test
- run: npx nx run @mangata-finance/sdk:semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Sleep for 1 minutes
run: sleep 60s
- name: Latest released rc version
run: |
rcVersion=$(npm show @mangata-finance/sdk dist-tags.rc)
echo "RC_SDK_VERSION=rcVersion" >> $GITHUB_ENV
- name: Invoke workflow in microapps repo with inputs
uses: jonas-schievink/workflow-proxy@v1
with:
ref: refs/heads/main
workflow: pr-ui-chops-tests.yml
repo: mangata-finance/microapps
token: ${{ secrets.GH_TOKEN }}
inputs: '{"sdkVersion": "${{ env.RC_SDK_VERSION }}", "peerDependencies": "${{ env.PEER_DEPENDENCIES }}"}'