-
Notifications
You must be signed in to change notification settings - Fork 261
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
ci: add codecov #866
ci: add codecov #866
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,3 +250,83 @@ jobs: | |
|
||
- name: "Test Go SDK" | ||
run: make test-sdk-go | ||
|
||
code-coverage: | ||
name: Run code coverage | ||
runs-on: ${{ matrix.config.os }} | ||
needs: build-rust | ||
strategy: | ||
matrix: | ||
config: | ||
- { | ||
os: "ubuntu-latest", | ||
extension: "", | ||
# We have this enabled for releases, so we should test it. | ||
extraArgs: "--features openssl/vendored", | ||
bindleUrl: "https://bindle.blob.core.windows.net/releases/bindle-v0.8.0-linux-amd64.tar.gz", | ||
bindleBinary: "bindle-server", | ||
pathInBindleArchive: "bindle-server", | ||
nomadUrl: "https://releases.hashicorp.com/nomad/1.3.1/nomad_1.3.1_linux_amd64.zip", | ||
nomadBinary: "nomad", | ||
pathInNomadArchive: "nomad", | ||
hippoUrl: "https://github.com/deislabs/hippo/releases/download/v0.19.0/hippo-server-linux-x64.tar.gz", | ||
} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install latest Rust stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
|
||
- name: "Install Wasm Rust target" | ||
run: rustup target add wasm32-wasi | ||
|
||
- name: Install bindle | ||
uses: engineerd/[email protected] | ||
with: | ||
name: ${{ matrix.config.bindleBinary }} | ||
url: ${{ matrix.config.bindleUrl }} | ||
pathInArchive: ${{ matrix.config.pathInBindleArchive }} | ||
|
||
- name: Install nomad | ||
uses: engineerd/[email protected] | ||
with: | ||
name: ${{ matrix.config.nomadBinary }} | ||
url: ${{ matrix.config.nomadUrl }} | ||
pathInArchive: ${{ matrix.config.pathInNomadArchive }} | ||
|
||
- name: Install hippo | ||
run: | | ||
curl -L ${{ matrix.config.hippoUrl }} -o hippo-server.tar.gz | ||
mkdir hippo-server-output | ||
tar xz -C hippo-server-output -f hippo-server.tar.gz | ||
cp -r hippo-server-output/**/* ~/configurator/bin | ||
chmod +x ~/configurator/bin/Hippo.Web | ||
|
||
- name: Install cargo-tarpaulin binary crate | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-tarpaulin | ||
version: latest | ||
use-tool-cache: true | ||
|
||
- name: Cargo Tarpaulin | ||
run: cargo tarpaulin --follow-exec --skip-clean -t 6000 --out xml --features openssl/vendored,default,e2e-tests | ||
env: | ||
RUST_LOG: spin=trace | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we only interested in codecov results for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would imagine we'd like it for PRs too, but its easy enough to change 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great, we can see how it works for us for |
||
with: | ||
fail_ci_if_error: true | ||
verbose: true | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
name: code-coverage-report | ||
path: cobertura.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @lann or @radu-matei on if this
cargo tarpaulin
command suits our needs per the original issue #367There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that's what I use.