Skip to content

Commit

Permalink
fix: long running and non critical github action (#4009)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
Cifko authored Apr 7, 2022
1 parent 5bda4b8 commit 3b8cb8b
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 86 deletions.
124 changes: 81 additions & 43 deletions .github/workflows/long_running.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
124 changes: 81 additions & 43 deletions .github/workflows/non_critical_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3b8cb8b

Please sign in to comment.