Skip to content

Commit

Permalink
[ci] Add test-linux-stable jobs GHA (paritytech#4897)
Browse files Browse the repository at this point in the history
PR adds github-action for jobs test-linux-stable-oldkernel.
PR waits the latest release of forklift.

cc paritytech/ci_cd#939
cc paritytech/ci_cd#1006

---------

Co-authored-by: Maksym H <[email protected]>
  • Loading branch information
alvicsam and mordamax authored Aug 8, 2024
1 parent eb0a9e5 commit 12539e7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 7 deletions.
63 changes: 58 additions & 5 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ on:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
types: [opened, synchronize, reopened, ready_for_review, labeled]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
changes:
# TODO: remove once migration is complete or this workflow is fully stable
if: contains(github.event.label.name, 'GHA-migration')
permissions:
pull-requests: read
uses: ./.github/workflows/reusable-check-changed-files.yml
Expand All @@ -34,7 +36,7 @@ jobs:
run: cat .github/env >> $GITHUB_OUTPUT

test-linux-stable-int:
needs: [ set-image, changes ]
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 60
Expand All @@ -51,11 +53,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: WASM_BUILD_NO_COLOR=1 time forklift cargo test -p staging-node-cli --release --locked -- --ignored
run: WASM_BUILD_NO_COLOR=1 forklift cargo test -p staging-node-cli --release --locked -- --ignored

# https://github.com/paritytech/ci_cd/issues/864
test-linux-stable-runtime-benchmarks:
needs: [ set-image, changes ]
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 60
Expand All @@ -70,4 +72,55 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: time forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet

test-linux-stable:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
runs-on: ${{ matrix.runners }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
partition: [1/3, 2/3, 3/3]
runners: [arc-runners-polkadot-sdk-beefy, oldlinux]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
# needed for tests that use unshare syscall
options: --security-opt seccomp=unconfined
env:
RUST_TOOLCHAIN: stable
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
# Fixes "detected dubious ownership" error in the ci
git config --global --add safe.directory '*'
forklift cargo nextest run \
--workspace \
--locked \
--release \
--no-fail-fast \
--features try-runtime,experimental,riscv,ci-only-tests \
--partition count:${{ matrix.partition }}
# run runtime-api tests with `enable-staging-api` feature on the 1st node
- name: runtime-api tests
if: ${{ matrix.partition == '1/3' }}
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api

confirm-required-jobs-passed:
runs-on: ubuntu-latest
name: All tests passed
# If any new job gets added, be sure to add it to this array
needs:
[
test-linux-stable-int,
test-linux-stable-runtime-benchmarks,
test-linux-stable,
]
steps:
- run: echo '### Good job! All the tests passed 🚀' >> $GITHUB_STEP_SUMMARY
2 changes: 0 additions & 2 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ test-linux-stable-codecov:
codecovcli -v do-upload -f target/coverage/result/report-${CI_NODE_INDEX}.lcov --disable-search -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --git-service github;
fi
#

test-linux-stable:
stage: test
extends:
Expand Down

0 comments on commit 12539e7

Please sign in to comment.