difftreelog
Merge pull request #2 from lzadjsf/ci-build-workflow-v3
in: master
Re-created branch with changes related to STEP1 task.
10 files changed
.docker/Dockerfile-chain-devdiffbeforeafterbothno changes
.docker/Dockerfile-parachaindiffbeforeafterbothno changes
.docker/Dockerfile-parachain-v2diffbeforeafterbothno changes
.docker/docker-compose-dev.yamldiffbeforeafterbothno changes
.docker/docker-compose-tests-parachain.ymldiffbeforeafterbothno changes
.docker/docker-compose.tmp.j2diffbeforeafterbothno changes
.github/workflows/codestyle.ymldiffbeforeafterboth1name: Code style1name: Code style223on: [push]3on:4 pull_request:5 branches:6 - develop7 types:8 - opened9 - edited4105jobs:11jobs:6 rustfmt:12 rustfmt:7 runs-on: ubuntu-20.0413 runs-on: self-hosted-ci8149 steps:15 steps:10 - uses: actions/checkout@v116 - uses: actions/checkout@v1202621 clippy:27 clippy:22 if: ${{ false }}28 if: ${{ false }}23 runs-on: ubuntu-20.0429 runs-on: self-hosted-ci243025 steps:31 steps:26 - uses: actions/checkout@v132 - uses: actions/checkout@v1.github/workflows/node_build_test.ymldiffbeforeafterboth1name: Build & test1name: Build & test223# Controls when the action will run. 3# Controls when the action will run.4on:4on:5 # Triggers the workflow on push or pull request events but only for the master branch5 # Triggers the workflow on push or pull request events but only for the master branch6 #push:7 # branches: [ develop ]6 push:8 pull_request:7 branches: [ develop ]9 branches:10 - develop11 types:12 - opened13 - edited14 - reopened8 # pull_request:15 # pull_request:9 # branches: [ develop ]16 # branches: [ develop ]10 # Allows you to run this workflow manually from the Actions tab17 # Allows you to run this workflow manually from the Actions tab11 workflow_dispatch:18 workflow_dispatch:121913# A workflow run is made up of one or more jobs that can run sequentially or in parallel20#Define Workflow variables21env:22 ubuntu_version: focal23 chains_release_dir: /opt/runner/chains_release24 opal_chain_workdir: ./src_opal_chain25 quartz_chain_workdir: ./src_quartz_chain26 unique_chain_workdir: ./src_unique_chain27 src_repo_url: https://github.com/lzadjsf/unique-chain.git28 RUST_TOOLCHAIN: nightly-2022-05-1129 REPO_URL: ${{ github.server_url }}/${{ github.repository }}3031# A workflow run is made up of one or more jobs that can run sequentially or in parallel14jobs:32jobs:33 pre-requisites:34 # The type of runner that the job will run on35 runs-on: self-hosted-ci3637 steps:38 #runs ssh connection39 - name: Install dependencies40 run: |41 sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang make cmake42 sudo apt autoremove43 curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none44 . $HOME/.cargo/env && cargo install --locked --git https://github.com/chevdor/subwasm45 rustup toolchain install ${{ env.RUST_TOOLCHAIN }}46 rustup default ${{ env.RUST_TOOLCHAIN }}47 rustup target add wasm32-unknown-unknown --toolchain ${{ env.RUST_TOOLCHAIN }}484915 build:50 build:16 # The type of runner that the job will run on51 # The type of runner that the job will run on17 runs-on: ubuntu-20.0452 runs-on: self-hosted-ci185319 # if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true54 needs: pre-requisites2055 name: Build Container, Spin it Up an test21 # Steps represent a sequence of tasks that will be executed as part of the job5657 continue-on-error: true #Do not stop testing of matrix runs failed.5859 strategy:60 matrix:61 include:62 - network: "Opal"63 features: " "64 - network: "Quartz"65 features: "--features=quartz-runtime"66 - network: "Unique"67 features: "--features=unique-runtime"6822 steps:69 steps:23 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it70 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it71 - uses: actions/checkout@v37273 - name: Generate ENV related extend file for docker-compose74 uses: cuchi/jinja2-action@v1.2.075 with:76 template: .docker/docker-compose.tmp.j277 output_file: .docker/docker-compose.${{ matrix.network }}.yml78 variables: |79 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git80 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}81 FEATURE=${{ matrix.features }}82 BRANCH=${{ github.head_ref }}8384 - name: Show temporary file85 run: cat .docker/docker-compose.${{ matrix.network }}.yml8687 - name: Build the stack88 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build8990# - name: "Build the Docker image with Feature: ${{ env.features }}"91# run: docker build -t build-${{ github.head_ref }} --file .docker/Dockerfile-chain-dev --build-arg REPO_URL=${{ github.server_url }}/${{ github.repository }}.git --build-arg RUST_TOOLCHAIN=${{ env.actual_toolchain }} --build-arg FEATURE="${{ env.features }}" --build-arg BRANCH=${{ github.head_ref }} --no-cache .9293 - name: Wait94 run: sleep 420s9524 - uses: actions/checkout@v296 - name: Install node25 97 uses: actions/setup-node@v126 #runs ssh connection98 with:99 node-version: 14.x100101 - name: Install dependencies102 run: |103 cd tests104 yarn install105 yarn add mochawesome106 yarn --pure-lockfile107108 - name: Run tests109 run: |110 cd tests111 ./scripts/ci-check-docker-state.sh112 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}113 env:114 RPC_URL: http://127.0.0.1:9933/11527 - name: Go to server116 - name: Test Report28 uses: appleboy/ssh-action@master117 uses: phoenix-actions/test-reporting@v829 with:118 id: test-report # Set ID reference for step30 host: ${{ secrets.SERVER_IP }}119 if: success() || failure() # run this step even if previous step failed31 username: ${{ secrets.SERVER_USERNAME }}120 with:32 key: ${{ secrets.KEY }}121 name: Tests ${{ matrix.network }} # Name of the check run which will be created33 port: ${{ secrets.SERVER_PORT }}122 path: tests/mochawesome-report/test-*.json # Path to test results34 command_timeout: 300m123 reporter: mochawesome-json35 script: |124 fail-on-error: 'false'36 eval $(ssh-agent -s)12537 ssh-add /home/devops/.ssh/git_hub126 - name: Stop running containers38 git clone git@github.com:UniqueNetwork/unique-chain.git127 if: always() # run this step always39 cd unique-chain128 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down40 git checkout develop41 # git pull --all42 chmod +x ci_node.sh43 ./ci_node.sh44 rm -rf /home/polkadot/unique-chain45129.github/workflows/notify.ymldiffbeforeafterboth1name: telegram message1name: telegram message2on:2on:3 push:3 pull_request:4 branches: [ develop ] 4 branches:5 - develop6 types:7 - opened8 - edited5jobs:9jobs:6 build: 10 build:7 runs-on: ubuntu-latest 11 runs-on: self-hosted-ci8 steps: 12 steps:9 - uses: avkviring/telegram-github-action@v0.0.1313 - uses: avkviring/telegram-github-action@v0.0.1310 env:14 env:.github/workflows/tests_codestyle.ymldiffbeforeafterboth1name: Tests code style1name: Tests code style223on: [push]3on:44 pull_request:5 branches:6 - develop7 types:8 - opened9 - edited5jobs:10jobs:6 build:11 build:7 runs-on: ubuntu-20.0412 runs-on: self-hosted-ci8139 steps:14 steps:10 - uses: actions/checkout@v215 - uses: actions/checkout@v2