Skip to content
Snippets Groups Projects
Commit a09e0a61 authored by Martin Larralde's avatar Martin Larralde
Browse files

Setup `test.yml` Actions workflow to measure code coverage

parent 004b99a4
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ jobs:
command: fmt
args: --all -- --check
test:
name: Test (${{ matrix.rust-toolchain }}, ${{ matrix.features }})
name: Test (${{ matrix.rust-toolchain }}, ${{ matrix.cpu }})
runs-on: ubuntu-latest
needs: lint
strategy:
......@@ -31,9 +31,9 @@ jobs:
- stable
- beta
- nightly
flags:
- ""
- "--target-cpu=native"
cpu:
- "native"
- "x86-64"
steps:
- name: Checkout code
uses: actions/checkout@v1
......@@ -51,6 +51,45 @@ jobs:
- name: Test code
uses: actions-rs/cargo@v1
with:
env: RUSTFLAGS="${{ matrix.flags }}"
env: RUSTFLAGS="--target-cpu=${{ matrix.cpu }}"
command: test
\ No newline at end of file
cover:
name: Coverage (${{ matrix.cpu }})
runs-on: ubuntu-latest
needs: test
if: "!startsWith(github.ref, 'refs/tags/v')"
strategy:
matrix:
cpu:
- "native"
- "x86-64"
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup Rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Setup cache for cargo
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-${{ matrix.rust-toolchain }}
- name: Measure code coverage with ${{ matrix.features }}
uses: actions-rs/tarpaulin@v0.1
with:
env: RUSTFLAGS="--target-cpu=${{ matrix.cpu }}"
version: '0.19.0'
args: '--lib -v --out Xml --ciserver github-actions'
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.cpu }}
env_vars: OS
name: test-${{ matrix.cpu }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
codecov_curl_args: "--globoff"
verbose: true
\ No newline at end of file
......@@ -2,7 +2,7 @@
*A lightweight [platform-accelerated](https://en.wikipedia.org/wiki/Single_instruction,_multiple_data) library for [biological motif](https://en.wikipedia.org/wiki/Sequence_motif) scanning using [position weight matrices](https://en.wikipedia.org/wiki/Position_weight_matrix)*.
[![Actions](https://img.shields.io/github/actions/workflow/status/althonos/lightmotif/test.yml?branch=master&logo=github&style=flat-square&maxAge=300)](https://github.com/althonos/lightmotif/actions)
[![Actions](https://img.shields.io/github/actions/workflow/status/althonos/lightmotif/test.yml?branch=main&logo=github&style=flat-square&maxAge=300)](https://github.com/althonos/lightmotif/actions)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&maxAge=2678400)](https://choosealicense.com/licenses/mit/)
[![Source](https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=2678400&style=flat-square)](https://github.com/althonos/lightmotif/)
[![Mirror](https://img.shields.io/badge/mirror-EMBL-009f4d?style=flat-square&maxAge=2678400)](https://git.embl.de/larralde/lightmotif/)
......@@ -14,7 +14,7 @@
Motif scanning with position weight matrices (also known as position-specific
scoring matrices) is a robust method for identifying motifs of fixed length
inside a biological sequence. They can be used to identify transcription
factor binding sites in DNA, or protease cleavage site in polypeptides
factor binding sites in DNA, or protease cleavage site in polypeptides.
The `lightmotif` library provides a Rust crate to run very efficient
searches for a motif encoded in a position weight matrix. The position
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment