Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Add test-linux-stable jobs GHA #4897

Merged
merged 59 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
962a5ba
[WIP][ci] Test oldkernel runners
alvicsam Jun 27, 2024
db83277
run only on one partition
alvicsam Jun 27, 2024
533c396
run all tests
alvicsam Jun 27, 2024
6b75c7c
fix merge conflict
alvicsam Jun 27, 2024
5c096fc
add opt
alvicsam Jun 27, 2024
e4f5b5a
disable forklift, add test-linux-stable
alvicsam Jul 1, 2024
c86804b
compare jobs with and without forklift
alvicsam Jul 1, 2024
98afd5a
disable privileged for k8s runners
alvicsam Jul 1, 2024
59a615f
try seccomp
alvicsam Jul 1, 2024
88ff0cf
try ubuntu runners
alvicsam Jul 1, 2024
cb03bf1
upd prdoc
alvicsam Jul 1, 2024
cef34c6
run fl on ubuntu runners
alvicsam Jul 2, 2024
a53a62b
run only all_security_features_work
alvicsam Jul 2, 2024
779fe65
run all tests
alvicsam Jul 2, 2024
373b03c
test feature
alvicsam Jul 2, 2024
dfdf9cb
test landlock
alvicsam Jul 3, 2024
6f6c07c
add seccomp
alvicsam Jul 3, 2024
940576d
try gh runner
alvicsam Jul 3, 2024
97efeeb
run tests
alvicsam Jul 5, 2024
67a70fb
run on gitlab
alvicsam Jul 5, 2024
e960833
test ensure_check_metadata_works_on_real_extrinsics
alvicsam Jul 8, 2024
8c4b868
run test on gl
alvicsam Jul 8, 2024
2151b10
trace log
alvicsam Jul 8, 2024
ee50c6b
run upd fl
alvicsam Jul 9, 2024
680cf6a
run test-linux-stabe
alvicsam Jul 9, 2024
4ab7cdc
put workflows back
alvicsam Jul 15, 2024
4617271
modify condition
alvicsam Jul 15, 2024
e6b3a3d
rm leftovers
alvicsam Jul 15, 2024
5fd9ef1
disable forklift
alvicsam Jul 15, 2024
f812e5a
move forklift back
alvicsam Jul 15, 2024
142a74c
try fl 0.13.2
alvicsam Jul 15, 2024
82954bb
rm test forklift, modify condition
alvicsam Jul 16, 2024
1410c0e
use update ci image
alvicsam Jul 16, 2024
b30b9ac
Merge branch 'master' into as-oldkernel-gha
alvicsam Jul 16, 2024
91bac5c
test new image in gitlab
alvicsam Jul 16, 2024
995ff93
upd version
alvicsam Jul 16, 2024
d40062b
upd
alvicsam Jul 16, 2024
a40ff00
Merge branch 'master' into as-oldkernel-gha
alvicsam Jul 16, 2024
f34343d
Empty commit to trigger ci
alvicsam Jul 16, 2024
fcad053
run test without fl
alvicsam Jul 17, 2024
d35f7bb
test one test separately
alvicsam Jul 17, 2024
8c016c2
Merge branch 'master' into as-oldkernel-gha
alvicsam Jul 17, 2024
e29672c
use default image
alvicsam Jul 17, 2024
67c8602
run test on beefy
alvicsam Jul 17, 2024
07710cf
new ci image
alvicsam Jul 18, 2024
57a8ad2
Empty commit to trigger ci
alvicsam Jul 18, 2024
3b0be26
rm test jobs
alvicsam Jul 18, 2024
0603424
Merge branch 'master' into as-oldkernel-gha
alvicsam Jul 18, 2024
fa3d21e
add test-linux-stable, add final step
alvicsam Jul 19, 2024
0e9dc3f
rename final job
alvicsam Jul 19, 2024
a9dba81
Merge branch 'master' into as-oldkernel-gha
alvicsam Jul 24, 2024
98c27e9
Merge branch 'master' into as-oldkernel-gha
alvicsam Jul 25, 2024
9aa6772
Merge branch 'master' into as-oldkernel-gha
alvicsam Aug 8, 2024
0e98cb3
add label to run ci
alvicsam Aug 8, 2024
fa8caea
return nl
alvicsam Aug 8, 2024
66e1c31
Update .github/workflows/tests-linux-stable.yml
alvicsam Aug 8, 2024
927a60d
move runner type to matrix
alvicsam Aug 8, 2024
78d87f0
test action wo tags
alvicsam Aug 8, 2024
57f728f
uncomment label
alvicsam Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 95 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]
alvicsam marked this conversation as resolved.
Show resolved Hide resolved
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,92 @@ 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: arc-runners-polkadot-sdk-beefy
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
partition: [1/3, 2/3, 3/3]
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

test-linux-stable-oldkernel:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
runs-on: oldlinux
alvicsam marked this conversation as resolved.
Show resolved Hide resolved
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
partition: [1/3, 2/3, 3/3]
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,
test-linux-stable-oldkernel,
]
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
Loading