Skip to content

Commit

Permalink
Merge branch 'master' into mixnet
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjoon-lee authored Sep 5, 2023
2 parents b122867 + b9ef37e commit 798a847
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 16 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
pull_request:
push:
branches:
- master

name: Codecov

jobs:
test:
name: Test
env:
RUSTFLAGS: -C instrument-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: llvm-tools-preview
- uses: actions-rs/cargo@v1
continue-on-error: true
- run: |
cargo install grcov;
cargo test --no-default-features --features waku -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down
cargo test --no-default-features --features libp2p -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down
mkdir /tmp/cov;
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o /tmp/cov/tests.lcov;
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: /tmp/cov/
name: nomos-node-codecov
fail_ci_if_error: true


34 changes: 25 additions & 9 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ jobs:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: check
args: --all --no-default-features --features ${{ matrix.feature }}

test:
name: Test Suite
strategy:
fail-fast: false # all OSes should be tested even if one fails (default: true)
matrix:
Expand All @@ -43,27 +44,44 @@ jobs:
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
- uses: actions-rs/toolchain@v1
# Setup Rust toolchain with GNU for Windows
- name: Setup Rust with GNU toolchain (Windows)
if: matrix.os == 'windows-latest'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable-gnu
target: x86_64-pc-windows-gnu
override: true
# Setup Rust toolchain for other OSes
- name: Setup Rust toolchain (Other OSes)
if: matrix.os != 'windows-latest'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: build
args: --all --no-default-features --features ${{ matrix.feature }}
# Freeup some space for Windows tests
- name: Clean target dir (Windows)
if: matrix.os == 'windows-latest'
uses: actions-rs/cargo@v1
with:
command: clean
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: test
args: --all --no-default-features --features ${{ matrix.feature }}
args: --all --no-default-features --features ${{ matrix.feature }} -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down

lints:
name: Rust lints
runs-on: ubuntu-latest
matrix:
feature: [libp2p, waku]
strategy:
matrix:
feature: [libp2p, waku]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -77,14 +95,12 @@ jobs:

- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: clippy
args: --all --no-default-features --features ${{ matrix.feature }} -- --deny warnings
27 changes: 20 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: check
args: --all --no-default-features --features ${{ matrix.feature }}
Expand All @@ -46,21 +45,37 @@ jobs:
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
- uses: actions-rs/toolchain@v1
# Setup Rust toolchain with GNU for Windows
- name: Setup Rust with GNU toolchain (Windows)
if: matrix.os == 'windows-latest'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable-gnu
target: x86_64-pc-windows-gnu
override: true
# Setup Rust toolchain for other OSes
- name: Setup Rust toolchain (Other OSes)
if: matrix.os != 'windows-latest'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: build
args: --all --no-default-features --features ${{ matrix.feature }}
# Freeup some space for Windows tests
- name: Clean target dir (Windows)
if: matrix.os == 'windows-latest'
uses: actions-rs/cargo@v1
with:
command: clean
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: test
args: --all --no-default-features --features ${{ matrix.feature }}
args: --all --no-default-features --features ${{ matrix.feature }} -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down

lints:
name: Rust lints
Expand All @@ -81,14 +96,12 @@ jobs:

- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: clippy
args: --all --no-default-features --features ${{ matrix.feature }} -- --deny warnings

0 comments on commit 798a847

Please sign in to comment.