Skip to content

Commit

Permalink
test-collator-selection-ci-01
Browse files Browse the repository at this point in the history
  • Loading branch information
BuddyGlas committed Jun 14, 2024
1 parent 2413863 commit a1c5da6
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 503 deletions.
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
RUST_TOOLCHAIN=nightly-2024-04-10
POLKADOT_LAUNCH_BRANCH=unique-network
RELAY_CHAIN_TYPE=westend

POLKADOT_MAINNET_BRANCH=v1.2.4
Expand All @@ -18,7 +17,7 @@ SHIDEN_BUILD_BRANCH=v5.39.1
QUARTZ_MAINNET_BRANCH=release-v10030071
QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443

UNIQUEWEST_MAINNET_BRANCH=release-v0.9.43
UNIQUEWEST_MAINNET_BRANCH=v0.9.43
WESTMINT_BUILD_BRANCH=bad-branch-v1011001
OPAL_MAINNET_BRANCH=release-v10030071
OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/canary.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/ci-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
uses: ./.github/workflows/unit-test.yml
secrets: inherit

canary:
if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-canary')
uses: ./.github/workflows/canary.yml
secrets: inherit

xcm:
if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-xcm')
uses: ./.github/workflows/xcm.yml
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
uses: ./.github/workflows/unit-test.yml
secrets: inherit

# canary:
# uses: ./.github/workflows/canary.yml
# secrets: inherit # pass all secrets from initial workflow to nested

xcm:
uses: ./.github/workflows/xcm.yml
secrets: inherit # pass all secrets from initial workflow to nested
Expand Down
59 changes: 10 additions & 49 deletions .github/workflows/collator-selection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ env:
jobs:

prepare-execution-marix:

name: Prepare execution matrix

runs-on: [self-hosted-ci]
runs-on: [ test ]
outputs:
matrix: ${{ steps.create_matrix.outputs.matrix }}

steps:

- name: Clean Workspace
uses: AutoModality/[email protected]

Expand All @@ -41,10 +38,9 @@ jobs:
with:
matrix: |
network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
# network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}

collator-selection:

needs: prepare-execution-marix
# The type of runner that the job will run on
runs-on: [self-hosted-ci,large]
Expand Down Expand Up @@ -80,54 +76,21 @@ jobs:
uses: xom9ikk/dotenv@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

- name: Run find-and-replace to remove slashes from branch name
uses: mad9000/actions-find-and-replace-string@4
id: branchname
with:
source: ${{ github.head_ref }}
find: '/'
replace: '-'

- name: Generate ENV related extend Dockerfile file for POLKADOT
uses: cuchi/[email protected]
with:
template: .docker/Dockerfile-polkadot.j2
output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
variables: |
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
- name: Prepare polkadot
uses: ./.github/actions/buildContainer
- name: Check and pull polkadot image
id: polkadot
uses: cloudposse/github-action-docker-image-exists@main
with:
container: uniquenetwork/builder-polkadot
registry: registry.hub.docker.com
organization: parity
repository: polkadot
login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
tag: ${{ matrix.relay_branch }}
context: .docker
dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

# - name: pull needed images
# run: |
# docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}

# - name: Build unique-chain
# run: |
# docker build --file .docker/Dockerfile-unique \
# --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \
# --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \
# --tag uniquenetwork/ci-collator-selection-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }} \
# .

# - name: Push docker image version
# run: docker push uniquenetwork/ci-collator-selection-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }}


- name: Prepare latest
uses: ./.github/actions/buildContainer
Expand Down Expand Up @@ -178,8 +141,6 @@ jobs:
run: |
yarn install
yarn add mochawesome
# Wanted by both wait_for_first_block
# export RPC_URL="${RELAY_SAPPHIRE_HTTP_URL:-${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}}"
../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW}
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/execution-matrix.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/generate-execution-matrix.yml

This file was deleted.

Loading

0 comments on commit a1c5da6

Please sign in to comment.