Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

FrontEnd Codecov Try2 #111

FrontEnd Codecov Try2

FrontEnd Codecov Try2 #111

Workflow file for this run

name: Build and test API
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Testing keys
run: cp api/test_pk.pem api/publicKey.pem && cp api/test_sk.pem api/privateKey.pem
- name: Build
run: cd api && cargo build --verbose
- name: Run tests
run: cd api && cargo test --verbose
coverage:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Testing keys
run: cp api/test_pk.pem api/publicKey.pem && cp api/test_sk.pem api/privateKey.pem
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: cargo generate-lockfile
if: hashFiles('api/Cargo.lock') == ''
run: cd api && cargo generate-lockfile
- name: cargo llvm-cov
run: cd api && cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true