diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3495e23aab7fcd4256716804ac85c4f6c84636cf..24c3292fcdbe5175f47544a90ad4053a89ac06c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index 145d69393c2437aadf80e8be90cba9f20c652d27..7e6bfb67231051557449e888cdb7f8c15378174f 100644 --- a/README.md +++ b/README.md @@ -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)*. -[](https://github.com/althonos/lightmotif/actions) +[](https://github.com/althonos/lightmotif/actions) [](https://choosealicense.com/licenses/mit/) [](https://github.com/althonos/lightmotif/) [](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