Skip to content

Commit

Permalink
ci: move nightly job to the CI. (#770)
Browse files Browse the repository at this point in the history
* ci: move `nightly job` to the CI.

After the binaries `polkadot` and `staking-miner-playground` are
built in a cronjob, running all tests should take ~5 minutes which
is fast enough for the CI.

* add debug logs

* remove hacks

* Update .github/workflows/ci.yml

* strip binaries to make CI job faster

* Update .github/workflows/ci.yml
  • Loading branch information
niklasad1 authored Jan 16, 2024
1 parent 72e76ca commit 6fce866
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ updates:
- dependency-name: "polkadot-*"
- dependency-name: "node-template-*"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
6 changes: 3 additions & 3 deletions .github/workflows/actions/prepare-binaries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ runs:
chmod u+x ./tmp/polkadot* ./tmp/staking-miner-playground
./tmp/polkadot --version
./tmp/staking-miner-playground --version
mkdir -p ~/.local/bin
mv ./tmp/polkadot* ~/.local/bin
mv ./tmp/staking-miner-playground ~/.local/bin
mkdir -p /usr/local/bin
mv ./tmp/polkadot* /usr/local/bin
mv ./tmp/staking-miner-playground /usr/local/bin
3 changes: 3 additions & 0 deletions .github/workflows/build-polkadot-for-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
run: |
cargo build -p polkadot --release --features fast-runtime
./target/release/polkadot --version
strip -s ./target/release/polkadot
strip -s ./target/release/polkadot-prepare-worker
strip -s ./target/release/polkadot-execute-worker
- name: upload polkadot binary
uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
cd staking-miner-playground
cargo build --release --features test-trimming
./target/release/staking-miner-playground --version
strip -s ./target/release/staking-miner-playground
- name: upload staking-miner-playground binary
uses: actions/upload-artifact@v3
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get Polkadot and Staking Miner Playground binaries
uses: ./.github/workflows/actions/prepare-binaries

- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
with:
Expand All @@ -138,7 +141,7 @@ jobs:
- name: Run tests on Ubuntu
run: |
${{ env.RUST_INFO }}
RUST_LOG=info cargo test --workspace -- --nocapture
RUST_LOG=info cargo +stable test --workspace -- --nocapture
build:
name: Build polkadot-staking-miner binary
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/nightly.yml

This file was deleted.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,3 @@ anyhow = "1"
assert_cmd = "2.0"
sp-storage = "17.0.0"
regex = "1"

[features]
default = []
slow-tests = []
1 change: 0 additions & 1 deletion tests/monitor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Requires a `polkadot binary ` built with `--features fast-runtime` in the path to run integration tests against.
#![cfg(feature = "slow-tests")]
pub mod common;

Expand Down

0 comments on commit 6fce866

Please sign in to comment.