name: ci-test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-rust:
name: test-rust
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt override: true
- name: Unit tests with coverage
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.18.0'
args: '--avoid-cfg-tarpaulin --all-features -- --test-threads 1'
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.5.2
- name: Archive code coverage results
uses: actions/upload-artifact@v2.2.4
with:
name: code-coverage-report
path: cobertura.xml
test-rust-sgx:
name: test-rust-sgx
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt target: x86_64-fortanix-unknown-sgx
override: true
- name: Build for SGX
uses: actions-rs/cargo@v1
with:
command: build
args: --target x86_64-fortanix-unknown-sgx --all-features