Skip to content

Commit

Permalink
Merge branch 'tomas/ci-integration-tests' (#1752)
Browse files Browse the repository at this point in the history
* tomas/ci-integration-tests:
  ci: add masp params for integration tests
  make: run integration tests with unit test coverage
  ci/e2e: remove removed masp tests
  ci: put back accidentally removed changes
  • Loading branch information
tzemanovic committed Jul 25, 2023
2 parents b6714b5 + 3f2c793 commit ddb8fb4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
BUCKET_NAME: namada-wasm-master
AWS_REGION: eu-west-1

namada:
unit-and-integration-tests:
runs-on:
group: gians-runners
timeout-minutes: 80
Expand Down Expand Up @@ -238,6 +238,12 @@ jobs:
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Download MASP parameters
run: |
mkdir -p /home/runner/.masp-params
curl -o /home/runner/.masp-params/masp-spend.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-spend.params\?raw\=true
curl -o /home/runner/.masp-params/masp-output.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-output.params?raw=true
curl -o /home/runner/.masp-params/masp-convert.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-convert.params?raw=true
- name: Download wasm artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -246,9 +252,10 @@ jobs:
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Check crates build with default features
run: make check-crates
- name: Run unit test
run: make test-unit-coverage${{ matrix.make.suffix }}
- name: Run unit and integration tests
run: make test-coverage${{ matrix.make.suffix }}
env:
NAMADA_MASP_PARAMS_DIR: /home/runner/.masp-params
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload coverage
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -386,6 +393,7 @@ jobs:
os: [ubuntu-20.04]
nightly_version: [nightly-2023-06-01]
mold_version: [1.7.0]
comet_bft: [0.37.2]
make:
- name: e2e
suffix: ''
Expand Down Expand Up @@ -488,6 +496,12 @@ jobs:
run: make build-test
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Download MASP parameters
run: |
mkdir -p /home/runner/.masp-params
curl -o /home/runner/.masp-params/masp-spend.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-spend.params\?raw\=true
curl -o /home/runner/.masp-params/masp-output.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-output.params?raw=true
curl -o /home/runner/.masp-params/masp-convert.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-convert.params?raw=true
- name: Wait for release binaries
uses: lewagon/[email protected]
with:
Expand All @@ -508,7 +522,7 @@ jobs:
path: ./target/release/
- name: Download CometBFT
run: |
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v0.37.2/cometbft_0.37.2_linux_amd64.tar.gz
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v${{ matrix.comet_bft }}/cometbft_${{ matrix.comet_bft }}_linux_amd64.tar.gz
tar -xvzf cometbft.tar.gz
mv cometbft /usr/local/bin
- name: Change permissions
Expand All @@ -522,6 +536,7 @@ jobs:
run: |
python3 .github/workflows/scripts/schedule-e2e.py
env:
NAMADA_MASP_PARAMS_DIR: /home/runner/.masp-params
NAMADA_E2E_USE_PREBUILT_BINARIES: "true"
NAMADA_E2E_KEEP_TEMP: "true"
NAMADA_TM_STDOUT: "false"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
if: matrix.os == 'ubuntu-20.04'
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.3.0
SCCACHE_VERSION: v0.5.4
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
if: matrix.os == 'ubuntu-20.04'
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.3.0
SCCACHE_VERSION: v0.5.4
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
if: matrix.os == 'ubuntu-20.04'
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.3.0
SCCACHE_VERSION: v0.5.4
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/scripts/e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"e2e::ledger_tests::invalid_transactions": 13,
"e2e::ledger_tests::ledger_many_txs_in_a_block": 55,
"e2e::ledger_tests::ledger_txs_and_queries": 30,
"e2e::ledger_tests::masp_incentives": 618,
"e2e::ledger_tests::masp_pinned_txs": 75,
"e2e::ledger_tests::masp_txs_and_queries": 282,
"e2e::ledger_tests::pos_bonds": 77,
"e2e::ledger_tests::pos_init_validator": 40,
"e2e::ledger_tests::proposal_offline": 21,
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ audit:

test: test-unit test-e2e test-wasm

test-unit-coverage:
# Integration and unit tests with coverage report
test-coverage:
$(cargo) +$(nightly) llvm-cov --output-dir target \
--features namada/testing \
--html \
-- --skip e2e --skip integration -Z unstable-options --report-time
-- --skip e2e -Z unstable-options --report-time

# NOTE: `TEST_FILTER` is prepended with `e2e::`. Since filters in `cargo test`
# work with a substring search, TEST_FILTER only works if it contains a string
Expand Down

0 comments on commit ddb8fb4

Please sign in to comment.