git.delta.rocks / unique-network / refs/commits / 50fb43d1067e

difftreelog

Merge pull request #461 from lzadjsf/ci-build-workflow-v3

kozyrevdev2022-08-05parents: #b7c1009 #9f15e9c.patch.diff
in: master
CI, step 1

12 files changed

added.docker/Dockerfile-chain-devdiffbeforeafterboth

no changes

added.docker/Dockerfile-parachaindiffbeforeafterboth

no changes

added.docker/docker-compose-dev.yamldiffbeforeafterboth

no changes

added.docker/docker-compose.tmp.j2diffbeforeafterboth

no changes

modified.dockerignorediffbeforeafterboth
1.git/1.git/
2.github/2.github/
3.docker/
3doc/4doc/
4target/5target/
5tests/6tests/
modified.github/workflows/codestyle.ymldiffbeforeafterboth
1name: Code style1name: Code style
22
3on: [push]3on:
4 pull_request:
5 branches:
6 - develop
7 types:
8 - opened
9 - reopened
10 - synchronize
411
5jobs:12jobs:
6 rustfmt:13 rustfmt:
7 runs-on: ubuntu-20.0414 runs-on: self-hosted-ci
815
9 steps:16 steps:
17 - name: Skip if pull request is in Draft
18 # `if: github.event.pull_request.draft == true` should be kept here, at
19 # the step level, rather than at the job level. The latter is not
20 # recommended because when the PR is moved from "Draft" to "Ready to
21 # review" the workflow will immediately be passing (since it was skipped),
22 # even though it hasn't actually ran, since it takes a few seconds for
23 # the workflow to start. This is also disclosed in:
24 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
25 # That scenario would open an opportunity for the check to be bypassed:
26 # 1. Get your PR approved
27 # 2. Move it to Draft
28 # 3. Push whatever commits you want
29 # 4. Move it to "Ready for review"; now the workflow is passing (it was
30 # skipped) and "Check reviews" is also passing (it won't be updated
31 # until the workflow is finished)
32 if: github.event.pull_request.draft == true
33 run: exit 1
34
10 - uses: actions/checkout@v135 - uses: actions/checkout@v1
11 - name: Install latest nightly36 - name: Install latest nightly
2045
21 clippy:46 clippy:
22 if: ${{ false }}47 if: ${{ false }}
23 runs-on: ubuntu-20.0448 runs-on: self-hosted-ci
2449
25 steps:50 steps:
51 - name: Skip if pull request is in Draft
52 # `if: github.event.pull_request.draft == true` should be kept here, at
53 # the step level, rather than at the job level. The latter is not
54 # recommended because when the PR is moved from "Draft" to "Ready to
55 # review" the workflow will immediately be passing (since it was skipped),
56 # even though it hasn't actually ran, since it takes a few seconds for
57 # the workflow to start. This is also disclosed in:
58 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
59 # That scenario would open an opportunity for the check to be bypassed:
60 # 1. Get your PR approved
61 # 2. Move it to Draft
62 # 3. Push whatever commits you want
63 # 4. Move it to "Ready for review"; now the workflow is passing (it was
64 # skipped) and "Check reviews" is also passing (it won't be updated
65 # until the workflow is finished)
66 if: github.event.pull_request.draft == true
67 run: exit 1
68
26 - uses: actions/checkout@v169 - uses: actions/checkout@v3
27 - name: Install substrate dependencies70 - name: Install substrate dependencies
28 run: sudo apt-get install libssl-dev pkg-config libclang-dev clang71 run: sudo apt-get install libssl-dev pkg-config libclang-dev clang
29 - name: Install latest nightly72 - name: Install latest nightly
modified.github/workflows/node_build_test.ymldiffbeforeafterboth
1name: Build & test1name: Develop - Build & test
22
3# 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 branch
6 push:6 pull_request:
7 branches: [ develop ]7 branches:
8 # pull_request:8 - develop
9 # branches: [ develop ]9 types:
10 - opened
11 - reopened
12 - synchronize #commit(s) pushed to the pull request
13
10 # Allows you to run this workflow manually from the Actions tab14 # Allows you to run this workflow manually from the Actions tab
11 workflow_dispatch:15 workflow_dispatch:
1216
13# A workflow run is made up of one or more jobs that can run sequentially or in parallel17#Define Workflow variables
18env:
19 RUST_TOOLCHAIN: nightly-2022-05-11
20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}
21 POLKA_VERSION: release-v0.9.24
22
23# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14jobs:24jobs:
15 build:25 build:
16 # The type of runner that the job will run on26 # The type of runner that the job will run on
17 runs-on: ubuntu-20.0427 runs-on: self-hosted-ci
1828
19 # if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true29 name: Build Container, Spin it Up an test
2030
21 # Steps represent a sequence of tasks that will be executed as part of the job31 continue-on-error: false #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
32
33 strategy:
34 matrix:
35 include:
36 - network: "Opal"
37 features: "--features=opal-runtime"
38 - network: "Quartz"
39 features: "--features=quartz-runtime"
40 - network: "Unique"
41 features: "--features=unique-runtime"
42
22 steps:43 steps:
44 - name: Skip if pull request is in Draft
45 # `if: github.event.pull_request.draft == true` should be kept here, at
46 # the step level, rather than at the job level. The latter is not
47 # recommended because when the PR is moved from "Draft" to "Ready to
48 # review" the workflow will immediately be passing (since it was skipped),
49 # even though it hasn't actually ran, since it takes a few seconds for
50 # the workflow to start. This is also disclosed in:
51 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
52 # That scenario would open an opportunity for the check to be bypassed:
53 # 1. Get your PR approved
54 # 2. Move it to Draft
55 # 3. Push whatever commits you want
56 # 4. Move it to "Ready for review"; now the workflow is passing (it was
57 # skipped) and "Check reviews" is also passing (it won't be updated
58 # until the workflow is finished)
59 if: github.event.pull_request.draft == true
60 run: exit 1
61
23 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it62 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24 - uses: actions/checkout@v263 - uses: actions/checkout@v3
25 64 with:
26 #runs ssh connection65 ref: ${{ github.head_ref }} #Checking out head commit
66
67 - name: Generate ENV related extend file for docker-compose
68 uses: cuchi/jinja2-action@v1.2.0
69 with:
70 template: .docker/docker-compose.tmp.j2
71 output_file: .docker/docker-compose.${{ matrix.network }}.yml
72 variables: |
73 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
74 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
75 POLKA_VERSION=${{ env.POLKA_VERSION }}
76 FEATURE='${{ matrix.features }}'
77 BRANCH=${{ github.head_ref }}
78
79 - name: Show build configuration
80 run: cat .docker/docker-compose.${{ matrix.network }}.yml
81
82 - name: Build the stack
83 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build
84
85 - uses: actions/setup-node@v3
86 with:
87 node-version: 16
88
89 - name: Run tests
90 run: |
91 cd tests
92 yarn install
93 yarn add mochawesome
94 echo "Ready to start tests"
95 node scripts/readyness.js
96 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
97 env:
98 RPC_URL: http://127.0.0.1:9933/
99
27 - name: Go to server100 - name: Test Report
28 uses: appleboy/ssh-action@master101 uses: phoenix-actions/test-reporting@v8
102 if: success() || failure() # run this step even if previous step failed
29 with:103 with:
30 host: ${{ secrets.SERVER_IP }}
31 username: ${{ secrets.SERVER_USERNAME }}104 name: Tests ${{ matrix.network }} # Name of the check run which will be created
32 key: ${{ secrets.KEY }}105 path: tests/mochawesome-report/test-*.json # Path to test results
33 port: ${{ secrets.SERVER_PORT }}106 reporter: mochawesome-json
34 command_timeout: 300m
35 script: |107 fail-on-error: 'false'
36 eval $(ssh-agent -s)108
37 ssh-add /home/devops/.ssh/git_hub109 - name: Read output variables
38 git clone git@github.com:UniqueNetwork/unique-chain.git110 run: |
39 cd unique-chain111 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
40 git checkout develop112
41 # git pull --all113 - name: Stop running containers
42 chmod +x ci_node.sh114 if: always() # run this step always
43 ./ci_node.sh115 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
44 rm -rf /home/polkadot/unique-chain
45116
deleted.github/workflows/notify.ymldiffbeforeafterboth

no changes

modified.github/workflows/tests_codestyle.ymldiffbeforeafterboth
1name: Tests code style1name: Tests code style
22
3on: [push]3on:
44 pull_request:
5 branches:
6 - develop
7 types:
8 - opened
9 - reopened
10 - synchronize
5jobs:11jobs:
6 build:12 build:
7 runs-on: ubuntu-20.0413 runs-on: self-hosted-ci
814
9 steps:15 steps:
16 - name: Skip if pull request is in Draft
17 # `if: github.event.pull_request.draft == true` should be kept here, at
18 # the step level, rather than at the job level. The latter is not
19 # recommended because when the PR is moved from "Draft" to "Ready to
20 # review" the workflow will immediately be passing (since it was skipped),
21 # even though it hasn't actually ran, since it takes a few seconds for
22 # the workflow to start. This is also disclosed in:
23 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
24 # That scenario would open an opportunity for the check to be bypassed:
25 # 1. Get your PR approved
26 # 2. Move it to Draft
27 # 3. Push whatever commits you want
28 # 4. Move it to "Ready for review"; now the workflow is passing (it was
29 # skipped) and "Check reviews" is also passing (it won't be updated
30 # until the workflow is finished)
31 if: github.event.pull_request.draft == true
32 run: exit 1
33
10 - uses: actions/checkout@v234 - uses: actions/checkout@v3
35
36 - uses: actions/setup-node@v3
37 with:
38 node-version: 16
39
11 - name: Install modules40 - name: Install modules
12 run: cd tests && yarn41 run: cd tests && yarn
deletedDockerfile-parachaindiffbeforeafterboth

no changes

deleteddocker-compose-tests-parachain.ymldiffbeforeafterboth

no changes

addedtests/scripts/readyness.jsdiffbeforeafterboth

no changes