Merge pull request #18 from sfc-aqua/introduce-websocket-for-controller #264
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and unit test | |
on: [push, pull_request] | |
jobs: | |
build_test: | |
name: build_test | |
strategy: | |
matrix: | |
platforms: ['ubuntu-latest'] | |
runs-on: ${{ matrix.platforms }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Run Cargo Check (Static check) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
- name: Run Cargo Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Run Unittest | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
coverge: | |
name: coverage measurement | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Get cargo tarpaulin | |
run : cargo install cargo-tarpaulin | |
- name: Clean just in case | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clean | |
- name: Run test and get coverage | |
run: | | |
cargo tarpaulin --workspace --all-features --out xml | |
- name: Upload to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |