mirror of
https://github.com/fluencelabs/aquavm
synced 2025-03-16 04:50:49 +00:00
* Test * Fix * Fix * Use new workflows * No cache * Typo * Rename Run tests to ci * Some renaming? * Renaming * Add nextest config * Test e2e on label * Test * Fix * Fixes * Update * Fix * Fix * Fix name * Fix * Rename report
82 lines
2.2 KiB
YAML
82 lines
2.2 KiB
YAML
name: Run tests with workflow_call
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
description: "git ref to checkout to"
|
|
type: string
|
|
default: "master"
|
|
|
|
jobs:
|
|
tests:
|
|
name: "cargo nextest"
|
|
timeout-minutes: 60
|
|
runs-on: builder
|
|
|
|
permissions:
|
|
checks: write # for coverall to create checks
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup rust toolchain
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
- name: Setup marine
|
|
uses: fluencelabs/setup-marine@v1
|
|
|
|
- name: Build Wasm binary for tests
|
|
run: ./build_test_binaries.sh
|
|
working-directory: air/tests/test_module
|
|
|
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
|
- uses: taiki-e/install-action@nextest
|
|
|
|
- run: cargo clean
|
|
- run: cargo build
|
|
|
|
- name: Run cargo nextest
|
|
run: cargo llvm-cov nextest --release --all-features --profile ci --lcov --output-path lcov.info
|
|
|
|
- name: Coveralls upload
|
|
uses: coverallsapp/github-action@v1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
path-to-lcov: lcov.info
|
|
|
|
- name: Archive code coverage results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: code-coverage-report.zip
|
|
path: lcov.info
|
|
|
|
- name: Upload test report
|
|
uses: dorny/test-reporter@v1
|
|
if: success() || failure()
|
|
with:
|
|
name: aquavm report
|
|
path: target/nextest/ci/junit.xml
|
|
reporter: java-junit
|
|
|
|
- name: Run tests with test_with_native_code
|
|
env:
|
|
RUST_TEST_THREADS: 1
|
|
run: |
|
|
# The `memory` sanitizer on cargo test has false positive even on empty project.
|
|
for san in address leak; do
|
|
RUSTFLAGS="$RUSTFLAGS -Z sanitizer=$san" cargo test --features test_with_native_code --target x86_64-unknown-linux-gnu
|
|
done
|
|
|
|
- name: Run cargo fmt
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Run cargo check
|
|
run: cargo check
|
|
|
|
- name: Check native aquavm-air-cli
|
|
run: cargo check --package aquavm-air-cli --no-default-features
|
|
|
|
- name: Run cargo clippy
|
|
run: cargo clippy -v
|