Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ run-name: ${{ github.actor }} is building action
on:
push:
branches:
- 'actions/**'
- 'master'

jobs:
dependencies:
build:
runs-on: ubuntu-20.04

steps:
- name: Install prerequisites
run: |
Expand All @@ -21,6 +23,36 @@ jobs:
- uses: actions/checkout@v3
- name: Build project
run: cargo build --verbose --jobs $(nproc)

- name: Run tests
run: cargo test --lib --bins --tests --jobs $(nproc)

coverage:
runs-on: ubuntu-20.04
needs: [build]

steps:
# - name: Install prerequisites
# run: |
# sudo apt update
# sudo apt install -y build-essential curl \
# cmake clang libclang-dev llvm llvm-dev \
# qt5-default libopencv-dev \
# python3-dev python3-numpy python3-opencv

- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
continue-on-error: true

- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --codecov --output-path coverage.json

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
file: coverage.json
fail_ci_if_error: true
3 changes: 0 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@ jobs:

- name: Run tests
run: cargo test --lib --bins --tests --jobs $(nproc)

# - name: Build docs
# run: cargo doc --lib --verbose --jobs $(nproc)