diff --git a/.github/workflows/create-release-draft.yml b/.github/workflows/create-release-draft.yml index fdbaad50f5..b9e7f94d0c 100644 --- a/.github/workflows/create-release-draft.yml +++ b/.github/workflows/create-release-draft.yml @@ -136,7 +136,6 @@ jobs: - name: Copy client binary to disk run: | docker cp $(docker create --rm litentry/litentry-parachain:${{ env.RELEASE_TAG }}):/usr/local/bin/litentry-collator . - - name: Upload the client binary uses: actions/upload-artifact@v3 with: @@ -147,7 +146,6 @@ jobs: ${{ env.GENESIS_RELEASE }}-genesis-state ${{ env.GENESIS_RELEASE }}-genesis-wasm - ## test again the built docker image ## run-ts-tests: runs-on: ubuntu-latest @@ -186,6 +184,73 @@ jobs: run: | make clean-docker-${{ matrix.chain }} + ## check extrinsic ## + extrinsic-ordering-check-from-bin: + runs-on: ubuntu-latest + needs: build-docker + strategy: + matrix: + chain: [rococo, litmus, litentry] + include: + - chain: rococo + ref_url: wss://rpc.rococo-parachain-sg.litentry.io + - chain: litmus + ref_url: wss://rpc.litmus-parachain.litentry.io + - chain: litentry + ref_url: wss://rpc.litentry-parachain.litentry.io + steps: + - name: Checkout sources + uses: actions/checkout@v3 + with: + ref: ${{ env.RELEASE_TAG }} + - name: Prepare output and compare the metadata + timeout-minutes: 3 + run: | + RELEASE_TAG=${{ env.RELEASE_TAG }} + PARACHAIN_NAME=local-parachain + BASE_URL=ws://127.0.0.1:9944 + chain=${{ matrix.chain }} + REF_URL=${{ matrix.ref_url }} + echo "Metadata comparison:" > output-$chain.txt + echo "Date: $(date)" >> output-$chain.txt + echo "Base: $BASE_URL" >> output-$chain.txt + echo "Reference: $REF_URL" >> output-$chain.txt + echo "Target Tag: $RELEASE_TAG" >> output-$chain.txt + echo "Chain: $chain" >> output-$chain.txt + echo "----------------------------------------------------------------------" >> output-$chain.txt + echo "Running parachain: $chain" + docker run --pull always --rm --name=$PARACHAIN_NAME -d -p 9944:9944 litentry/litentry-parachain:$RELEASE_TAG --chain=$chain --rpc-cors=all --ws-external --tmp -- --dev + sleep 3 + CMD="docker run --pull always --network host jacogr/polkadot-js-tools metadata $REF_URL $BASE_URL" + echo -e "Running:\n$CMD" + docker run --pull always --rm --network host jacogr/polkadot-js-tools metadata $REF_URL $BASE_URL | tee -a output-$chain.txt + SUMMARY=$(./scripts/extrinsic-ordering-filter.sh output-$chain.txt) + echo -e $SUMMARY >> output-$chain.txt + docker stop $PARACHAIN_NAME + content=$(< output-$chain.txt) + echo "content<> $GITHUB_ENV + echo "$content" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Find issues + uses: actions-cool/issues-helper@v3 + id: findissueid + with: + actions: 'find-issues' + token: ${{ secrets.GITHUB_TOKEN }} + issue-state: 'open' + title-includes: Litentry-parachain ${{ env.RELEASE_TAG }} Release checklist + + - name: Create comment + if: ${{ steps.findissueid.outputs.issues }} != '[]' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ fromJson(steps.findissueid.outputs.issues)[0].number }} + body: | + ${{ env.content }} + ## create the release draft ## create-release-draft: runs-on: ubuntu-latest diff --git a/.github/workflows/create-release-issue.yml b/.github/workflows/create-release-issue.yml index c074140060..594764976b 100644 --- a/.github/workflows/create-release-issue.yml +++ b/.github/workflows/create-release-issue.yml @@ -3,6 +3,7 @@ on: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+-[0-9]+' jobs: create-release-issue: diff --git a/.github/workflows/extrinsic-ordering-check-from-bin.yml b/.github/workflows/extrinsic-ordering-check-from-bin.yml deleted file mode 100644 index 59d35d07ad..0000000000 --- a/.github/workflows/extrinsic-ordering-check-from-bin.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Release - Extrinsic Ordering Check - -on: - workflow_run: - workflows: ["Create release draft", "Issue stale bot"] - branches: - - 577-automation-extrinsic-pallet-order-check" - - dev - - tmp - types: - - completed - # push: - # branches: - # - 577-automation-extrinsic-pallet-order-check - workflow_dispatch: - inputs: - chain: - description: The name of the chain to compare with, should be litentry or litmus - default: litentry - required: true -jobs: - check: - name: Run check - runs-on: ubuntu-latest - env: - CHAIN: ${{github.event.inputs.chain}} - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Pull polkadot-js-tools image - run: docker pull jacogr/polkadot-js-tools - - - name: Prepare output and compare the metadata - run: | - CHAIN=${CHAIN:-litmus} - BASE_URL=wss://parachain-eu-0.staging.litentry.io - LITENTRY_REF_URL=wss://rpc.litentry-parachain.litentry.io - LITMUS_REF_URL=wss://rpc.litmus-parachain.litentry.io - REF_URL=$LITENTRY_REF_URL - if [ "$CHAIN" == "litmus" ]; then REF_URL=$LITMUS_REF_URL; fi - echo "Metadata comparison:" > output.txt - echo "Date: $(date)" >> output.txt - echo "Base: $BASE_URL" >> output.txt - echo "Reference: $REF_URL" >> output.txt - echo "Target version: $VERSION" >> output.txt - echo "Chain: $CHAIN" >> output.txt - echo "----------------------------------------------------------------------" >> output.txt - CMD="docker run --pull always --network host jacogr/polkadot-js-tools metadata $REF_URL $BASE_URL" - echo -e "Running:\n$CMD" - $CMD >> output.txt - sed -z -i 's/\n\n/\n/g' output.txt - cat output.txt | egrep -n -i '' - SUMMARY=$(./scripts/extrinsic-ordering-filter.sh output.txt) - echo -e $SUMMARY - echo -e $SUMMARY >> output.txt - - - name: Show result - run: | - cat output.txt - - - name: Save output as artifact - uses: actions/upload-artifact@v3 - with: - name: output-${{ env.CHAIN }} - path: | - output.txt