meta raft log storage impl #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-place --in-diff git.dff | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mutants-out | |
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 | |
- name: prep benchmark comment | |
run: | | |
echo "## Benchmark Results" > prepped-bench.txt | |
echo "```sh" >> prepped-bench.txt | |
cat bench.txt >> prepped-bench.txt | |
echo "```" >> prepped-bench.txt | |
- name: add bench to pr | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: prepped-bench.txt | |
comment_tag: execution |