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

add code coverage to pipeline #1745

Merged
merged 47 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0968c27
add code coverage to pipeline
gpmayorga Feb 26, 2024
179c6b3
test triggers
gpmayorga Feb 26, 2024
3ed16c5
add prep-build
gpmayorga Feb 26, 2024
526fecb
remove bad trigger
gpmayorga Feb 26, 2024
7e92710
install nigthly toolchain
gpmayorga Feb 26, 2024
2081e78
fix concurrency
gpmayorga Feb 26, 2024
1e96100
delete nightly
gpmayorga Feb 26, 2024
44adabb
remove --all-features
gpmayorga Feb 26, 2024
6386f60
exclude weights and output html too
gpmayorga Feb 27, 2024
1982135
add exclusions, upload test results always
gpmayorga Feb 27, 2024
228149a
update codecov token
gpmayorga Feb 28, 2024
4d06bac
disable sccache
gpmayorga Feb 28, 2024
37e6d77
Merge branch 'main' into code-coverage
gpmayorga Feb 28, 2024
7a49255
remove features, fix if statement
gpmayorga Feb 28, 2024
b9982ad
remove verbose and incerase timeout
gpmayorga Feb 28, 2024
1e881e9
max waiting time
gpmayorga Feb 29, 2024
0e53752
chore: add no-std feat gate migration tuples
wischli Feb 29, 2024
6c8a521
Fix: FI swap correclty with asymmetric ratios (#1746)
lemunozm Feb 28, 2024
f2a2a3e
Fix: storage version mismatch + burn-unburned decoding issue (#1747)
wischli Feb 28, 2024
0ae2cf4
fix: pub altair migration std
wischli Feb 29, 2024
26af70c
Merge branch 'main' into code-coverage
gpmayorga Feb 29, 2024
7b7b3a5
bump machine and add llvm engine
gpmayorga Feb 29, 2024
5bbbc8d
try a half sized machine to see job times
gpmayorga Feb 29, 2024
3f3dc85
bump to ubuntu-8
gpmayorga Mar 1, 2024
4d8b2e1
simplier tarpaulin command
gpmayorga Mar 1, 2024
87cdc1e
add timeout
gpmayorga Mar 1, 2024
7cdb704
recover fast-runtime
gpmayorga Mar 1, 2024
dfe0227
add exception
gpmayorga Mar 2, 2024
9d18682
Merge branch 'main' into code-coverage
gpmayorga Mar 2, 2024
3e19602
clean up
gpmayorga Mar 5, 2024
47f9106
try out sccache
gpmayorga Mar 5, 2024
e09690a
add credentials for sccache
gpmayorga Mar 5, 2024
df1b367
run on main branch too. only non-draft prs
gpmayorga Mar 5, 2024
bbe0778
Merge branch 'main' into code-coverage
gpmayorga Mar 6, 2024
95e520e
delete migration line
gpmayorga Mar 7, 2024
83c4ca0
Merge branch 'main' into code-coverage
gpmayorga Mar 7, 2024
f1a490b
remove migrations std
gpmayorga Mar 8, 2024
ab18a21
exclude migrations
gpmayorga Mar 8, 2024
8bafe27
add codecov badge
gpmayorga Mar 8, 2024
afdfef5
cleanup migrations
gpmayorga Mar 8, 2024
9afff46
fix lint error
gpmayorga Mar 9, 2024
f2cdfbf
recover comment
gpmayorga Mar 9, 2024
8c6c063
revert migration.rs changes
gpmayorga Mar 9, 2024
febfb83
fix linting error
gpmayorga Mar 12, 2024
dd6da1a
Merge branch 'main' into code-coverage
gpmayorga Mar 12, 2024
51ef87d
Merge branch 'main' into code-coverage
gpmayorga Mar 13, 2024
9164bb1
Merge branch 'main' into code-coverage
wischli Apr 2, 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
2 changes: 1 addition & 1 deletion .github/actions/prep-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:

- name: Disable cache on forks and dependabot
if: github.event_name == 'pull_request'
shell: sh
shell: bash
run: |
if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ] || \
[ "${{ github.actor }}" == "dependabot[bot]" ] || \
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches: [main]
pull_request:
name: Code coverage
concurrency:
group: 'codecov-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
codecov:
runs-on: ubuntu-latest-8-cores
if: github.event.pull_request.draft == false || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@master

- name: Prep build
uses: ./.github/actions/prep-ubuntu
with:
cache: enabled
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}

- name: Install Tarpaulin
run: cargo install --locked cargo-tarpaulin

- name: generate codecov reports
env:
RUST_BACKTRACE: 1
run: |
cargo tarpaulin --timeout 300 -e runtime-integration-tests --features fast-runtime \
--workspace --exclude-files **/mock.rs **/weights.rs **/weights/* --out xml

# UPLOAD REPORTS (requires cargo 1.70.0)
- name: Upload to codecov.io
if: ${{ always() }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
44 changes: 0 additions & 44 deletions .github/workflows/xperimental-codecov.yml.commented

This file was deleted.

4 changes: 4 additions & 0 deletions runtime/altair/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ frame_support::parameter_types! {

/// The migration set for Altair 1034 @ Kusama. It includes all the migrations
gpmayorga marked this conversation as resolved.
Show resolved Hide resolved
/// that have to be applied on that chain.
#[cfg(not(feature = "std"))]
gpmayorga marked this conversation as resolved.
Show resolved Hide resolved
pub type UpgradeAltair1034 = (
// Updates asset custom metadata from mid 2023 to latest (two fields missing/mismatching)
translate_asset_metadata::Migration<super::Runtime>,
Expand Down Expand Up @@ -90,6 +91,9 @@ pub type UpgradeAltair1034 = (
runtime_common::migrations::increase_storage_version::Migration<crate::Council, 0, 4>,
);

#[cfg(feature = "std")]
pub type UpgradeAltair1034 = ();

#[allow(clippy::upper_case_acronyms)]
#[derive(
Clone,
Expand Down
4 changes: 4 additions & 0 deletions runtime/centrifuge/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ frame_support::parameter_types! {
pub const AnnualTreasuryInflationPercent: u32 = 3;
}

#[cfg(not(feature = "std"))]
pub type UpgradeCentrifuge1025 = (
runtime_common::migrations::epoch_execution::Migration<super::Runtime>,
// Migrates the currency used in `pallet-transfer-allowlist` from our global currency to a
Expand Down Expand Up @@ -89,6 +90,9 @@ pub type UpgradeCentrifuge1025 = (
burn_unburned::Migration<super::Runtime>,
);

#[cfg(feature = "std")]
pub type UpgradeCentrifuge1025 = ();

mod burn_unburned {
const LOG_PREFIX: &str = "BurnUnburnedMigration: ";
const LP_ETH_USDC: CurrencyId = CurrencyId::ForeignAsset(100_001);
Expand Down
4 changes: 4 additions & 0 deletions runtime/development/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frame_support::parameter_types! {
pub const AnnualTreasuryInflationPercent: u32 = 3;
}

#[cfg(not(feature = "std"))]
pub type UpgradeDevelopment1042 = (
// Register LocalUSDC
runtime_common::migrations::local_currency::register::Migration<
Expand Down Expand Up @@ -50,3 +51,6 @@ pub type UpgradeDevelopment1042 = (
AnnualTreasuryInflationPercent,
>,
);

#[cfg(feature = "std")]
pub type UpgradeDevelopment1042 = ();
Loading