Skip to content

Commit 65f6c7b

Browse files
authored
chore(ci): Add codecov and test report (#366)
* Add codecov and test report * Fix * Fix * Download wasm pack * Apply suggestion from nextest errors * Revert "Apply suggestion from nextest errors" This reverts commit 0124cc1. * Add badge
1 parent 854397a commit 65f6c7b

File tree

3 files changed

+46
-5
lines changed

3 files changed

+46
-5
lines changed

.config/nextest.toml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# https://nexte.st/book/configuration.html
2+
[store]
3+
dir = "target/nextest"
4+
5+
[profile.default]
6+
retries = 0
7+
test-threads = "num-cpus"
8+
threads-required = 1
9+
status-level = "pass"
10+
final-status-level = "fail"
11+
failure-output = "immediate"
12+
success-output = "never"
13+
fail-fast = false
14+
slow-timeout = { period = "60s", terminate-after = 2 }
15+
leak-timeout = "100ms"
16+
17+
[profile.ci]
18+
[profile.ci.junit]
19+
path = "junit.xml"

.github/workflows/run-tests.yml

+26-3
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,38 @@ jobs:
9191
-p marine \
9292
-p mrepl
9393
94-
- name: Run cargo test
95-
run: |
96-
cargo test --release -v --all-features \
94+
- uses: taiki-e/install-action@cargo-llvm-cov
95+
- uses: taiki-e/install-action@nextest
96+
97+
- name: Run cargo nextest
98+
run: cargo llvm-cov nextest --release -v --all-features --profile ci --lcov --output-path lcov.info \
9799
-p marine-core \
98100
-p marine \
99101
-p fluence-app-service \
100102
-p marine \
101103
-p mrepl \
102104

105+
- name: Coveralls upload
106+
uses: coverallsapp/github-action@v2
107+
with:
108+
github-token: ${{ secrets.GITHUB_TOKEN }}
109+
file: lcov.info
110+
111+
- name: Archive code coverage results
112+
if: github.event.pull_request.head.repo.fork != true
113+
uses: actions/upload-artifact@v3
114+
with:
115+
name: code-coverage-report.zip
116+
path: lcov.info
117+
118+
- name: Upload test report
119+
uses: dorny/test-reporter@v1
120+
if: (success() || failure()) && !github.event.pull_request.head.repo.fork
121+
with:
122+
name: marine report
123+
path: target/nextest/ci/junit.xml
124+
reporter: java-junit
125+
103126
- name: Run cargo clippy
104127
run: cargo clippy -v
105128

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Marine
22

33
![marine version on crates.io](https://img.shields.io/crates/v/marine?color=green&style=flat-square)
4+
[![Coverage Status](https://coveralls.io/repos/github/fluencelabs/marine/badge.svg)](https://coveralls.io/github/fluencelabs/marine)
45

56
Marine is a modern general purpose Wasm runtime based on the [component model](https://github.com/WebAssembly/component-model) capable of running multi-module Wasm applications, aka services, with [interface-types](https://github.com/WebAssembly/interface-types) and a [shared-nothing linking](https://training.linuxfoundation.org/blog/how-and-why-to-link-webassembly-modules/) scheme. This execution model is well suited for a variety of scenarios and especially applicable to implementations following the [entity component system](https://en.wikipedia.org/wiki/Entity_component_system) (ECS) pattern or plugin-based architectures.
67

@@ -136,5 +137,3 @@ Any interested person is welcome to contribute to the project. Please, make sure
136137
## License
137138

138139
All software code is copyright (c) Fluence Labs, Inc. under the [Apache-2.0](./LICENSE) license.
139-
140-

0 commit comments

Comments
 (0)