Skip to content

meta raft log storage impl #25

meta raft log storage impl

meta raft log storage impl #25

name: pull_requests
on:
pull_request:
types: [assigned, opened, synchronize, edited]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: "${{ matrix.os }}"
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup rust
run: |
rustup toolchain install nightly
rustup default nightly
- name: build
run: cargo build
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup rust
run: |
rustup toolchain install nightly
rustup default nightly
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: test
run: cargo llvm-cov nextest --ignore-filename-regex nova-api --all --benches --lcov --output-path lcov.info
- name: upload code coverage
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
test-incremental-mutants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- uses: taiki-e/install-action@v2
with:
tool: cargo-mutants,cargo-nextest
- name: generate diff
run: |
git branch -av
git diff origin/${{ github.base_ref }}.. | tee git.diff
- run: cargo mutants --test-tool=nextest -vV --in-diff git.diff
- uses: actions/upload-artifact@v4
with:
path: mutants.out
bench:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup rust
run: |
rustup toolchain install nightly
rustup default nightly
- name: bench
run: cargo bench > bench.txt
- name: upload bench
uses: actions/upload-artifact@v4
with:
path: bench.txt
update-pr:
needs:
- test-incremental-mutants
- bench
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup rust
run: |
rustup toolchain install nightly
rustup default nightly
- name: download bench
uses: actions/download-artifact@v4
with:
path: bench.txt
- name: download mutants
uses: actions/download-artifact@v4
with:
path: bench.txt
- name: prep benchmark comment
run: |
echo "## Benchmark Results" > results.txt
echo "```sh" >> results.txt
cat bench.txt >> results.txt
echo "```" >> results.txt
echo "## Mutants" >> results.txt
echo "```sh" >> results.txt
cat mutants.out >> results.txt
echo "```" >> results.txt
- name: update pr comment
uses: thollander/actions-comment-pull-request@v2
with:
filePath: results.txt
comment_tag: execution