From 3b8cb8ba237028fe848b7ee3771f91f729c26cd6 Mon Sep 17 00:00:00 2001 From: Martin Stefcek <35243812+Cifko@users.noreply.github.com> Date: Thu, 7 Apr 2022 12:55:11 +0200 Subject: [PATCH] fix: long running and non critical github action (#4009) Description --- I hope this is final fix for the github actions integration tests. How Has This Been Tested? --- Using [act](https://github.com/nektos/act). `act -j long-running` `act -j non-critical` --- .github/workflows/long_running.yml | 124 ++++++++++++------ .../non_critical_integration_tests.yml | 124 ++++++++++++------ 2 files changed, 162 insertions(+), 86 deletions(-) diff --git a/.github/workflows/long_running.yml b/.github/workflows/long_running.yml index 74e17e5800..c247f4cc6c 100644 --- a/.github/workflows/long_running.yml +++ b/.github/workflows/long_running.yml @@ -4,49 +4,87 @@ on: schedule: - cron: "0 12 * * 6" -defaults: - rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-09-18 +env: + toolchain: nightly-2021-11-20 jobs: - cucumber-js: - description: Run long-running critical cucumber tests + long-running: + name: Run long-running critical cucumber tests + runs-on: ubuntu-18.04 steps: - - run: - name: node -v - command: node -v - - run: - name: npm ci - command: cd integration_tests && npm ci - - run: - name: Build base node - command: cargo build --release --bin tari_base_node - - run: - name: Build wallet - command: cargo build --release --bin tari_console_wallet - - run: - name: Build mmproxy - command: cargo build --release --bin tari_merge_mining_proxy - - run: - name: Build mining_node - command: cargo build --release --bin tari_mining_node - - run: - name: Build stratum_transcoder - command: cargo build --release --bin tari_stratum_transcoder - - run: - name: Build validator node - command: cargo build --release --bin tari_validator_node - - run: - name: Run cucumber scenarios - no_output_timeout: 5h - command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "long-running" --tags "not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retry-tag-filter "@flaky and not @broken" - when: always - - run: - name: Generate report - command: cd integration_tests && node ./generate_report.js - when: always - - store_test_results: - path: integration_tests/cucumber_output - - store_artifacts: - path: integration_tests/cucumber_output - - store_artifacts: - path: integration_tests/temp/reports + - name: checkout + uses: actions/checkout@v2 + - name: toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.toolchain }} + profile: minimal + override: true + - uses: Swatinem/rust-cache@v1 + - name: ubuntu dependencies + run: | + sudo apt-get update && \ + sudo apt-get -y install \ + openssl \ + libssl-dev \ + pkg-config \ + libsqlite3-dev \ + clang-10 \ + git \ + cmake \ + libc++-dev \ + libc++abi-dev \ + libprotobuf-dev \ + protobuf-compiler \ + libncurses5-dev \ + libncursesw5-dev \ + zip \ + build-essential \ + libgtk-3-dev \ + libwebkit2gtk-4.0-dev \ + libsoup2.4-dev \ + curl \ + wget \ + libappindicator3-dev \ + patchelf \ + librsvg2-dev + - name: node -v + run: node -v + - name: build base node + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_base_node + - name: build console wallet + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_console_wallet + - name: build merge mining proxy + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_merge_mining_proxy + - name: build miner + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_mining_node + - name: build validator node + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_validator_node + - name: npm ci + run: cd integration_tests && npm ci && cd node_modules/wallet-grpc-client && npm ci + - name: Run integration tests + run: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "long-running" --tags "not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retry-tag-filter "@flaky and not @broken" + - name: Generate report + run: cd integration_tests && node ./generate_report.js + - name: Store test results + uses: actions/upload-artifact@v3 + with: + name: test results + path: | + integration_tests/cucumber_output + integration_tests/temp/reports diff --git a/.github/workflows/non_critical_integration_tests.yml b/.github/workflows/non_critical_integration_tests.yml index f5adb1b132..df8f63d2a4 100644 --- a/.github/workflows/non_critical_integration_tests.yml +++ b/.github/workflows/non_critical_integration_tests.yml @@ -4,49 +4,87 @@ on: schedule: - cron: "0 2 * * *" -defaults: - rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-09-18 +env: + toolchain: nightly-2021-11-20 jobs: - cucumber-js: - description: Run non critical cucumber tests + non-critical: + name: Run long-running critical cucumber tests + runs-on: ubuntu-18.04 steps: - - run: - name: node -v - command: node -v - - run: - name: npm ci - command: cd integration_tests && npm ci - - run: - name: Build base node - command: cargo build --release --bin tari_base_node - - run: - name: Build wallet - command: cargo build --release --bin tari_console_wallet - - run: - name: Build mmproxy - command: cargo build --release --bin tari_merge_mining_proxy - - run: - name: Build mining_node - command: cargo build --release --bin tari_mining_node - - run: - name: Build stratum_transcoder - command: cargo build --release --bin tari_stratum_transcoder - - run: - name: Build validator node - command: cargo build --release --bin tari_validator_node - - run: - name: Run cucumber scenarios - no_output_timeout: 1h - command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "non=critical" --tags "not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retry-tag-filter "@flaky and not @broken" - when: always - - run: - name: Generate report - command: cd integration_tests && node ./generate_report.js - when: always - - store_test_results: - path: integration_tests/cucumber_output - - store_artifacts: - path: integration_tests/cucumber_output - - store_artifacts: - path: integration_tests/temp/reports + - name: checkout + uses: actions/checkout@v2 + - name: toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.toolchain }} + profile: minimal + override: true + - uses: Swatinem/rust-cache@v1 + - name: ubuntu dependencies + run: | + sudo apt-get update && \ + sudo apt-get -y install \ + openssl \ + libssl-dev \ + pkg-config \ + libsqlite3-dev \ + clang-10 \ + git \ + cmake \ + libc++-dev \ + libc++abi-dev \ + libprotobuf-dev \ + protobuf-compiler \ + libncurses5-dev \ + libncursesw5-dev \ + zip \ + build-essential \ + libgtk-3-dev \ + libwebkit2gtk-4.0-dev \ + libsoup2.4-dev \ + curl \ + wget \ + libappindicator3-dev \ + patchelf \ + librsvg2-dev + - name: node -v + run: node -v + - name: build base node + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_base_node + - name: build console wallet + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_console_wallet + - name: build merge mining proxy + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_merge_mining_proxy + - name: build miner + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_mining_node + - name: build validator node + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --bin tari_validator_node + - name: npm ci + run: cd integration_tests && npm ci && cd node_modules/wallet-grpc-client && npm ci + - name: Run integration tests + run: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "non-critical" --tags "not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retry-tag-filter "@flaky and not @broken" + - name: Generate report + run: cd integration_tests && node ./generate_report.js + - name: Store test results + uses: actions/upload-artifact@v3 + with: + name: test results + path: | + integration_tests/cucumber_output + integration_tests/temp/reports