Skip to content

Commit

Permalink
feat(infra): cargo-llvm-cov --all
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Nov 23, 2024
1 parent abf6674 commit 8fe94c0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 57 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/grcov.yml

This file was deleted.

52 changes: 39 additions & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
name: Rust
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
on: [ push, pull_request ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
test:
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup ffmpeg
uses: AnimMouse/setup-ffmpeg@v1
- name: Show version information
run: |
ffmpeg -version
ffprobe -version
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all --lcov --output-path lcov.info
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v4
with:
file: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

e2e:
needs: [test, check_format, check_clippy]
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install npm dependencies
Expand All @@ -34,16 +60,15 @@ jobs:
run: |
ffmpeg -version
ffprobe -version
- name: Run tests
run: cargo test --all --verbose
- name: Run e2e tests
if: ${{ matrix.os != 'windows-latest' }}
run: npm run e2e:cluster

check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout source code
uses: actions/checkout@v4
- name: Show version information
run: |
cargo --version
Expand All @@ -55,7 +80,8 @@ jobs:
check_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout source code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
Expand Down

0 comments on commit 8fe94c0

Please sign in to comment.