meta raft log storage impl #38
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: install clang | |
if: github.actor == 'nektos/act' | |
run: | | |
apt-get update | |
apt-get install -y clang | |
- 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 | |
- name: install clang | |
if: github.actor == 'nektos/act' | |
run: | | |
apt-get update | |
apt-get install -y clang | |
- 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 | |
- name: install clang | |
if: github.actor == 'nektos/act' | |
run: | | |
apt-get update | |
apt-get install -y clang | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-mutants,cargo-nextest | |
- name: generate diff | |
if: github.actor != 'nektos/act' | |
continue-on-error: true | |
run: | | |
git branch -av | |
git diff origin/${{ github.base_ref }}.. > git.diff | |
- name: generate local diff | |
if: github.actor == 'nektos/act' | |
continue-on-error: true | |
run: | | |
git branch -av | |
git diff mainline > git.diff | |
- run: cargo mutants --test-tool=nextest -vV --in-diff git.diff | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
path: mutants.out | |
name: mutants | |
overwrite: true | |
bench: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: install clang | |
if: github.actor == 'nektos/act' | |
run: | | |
apt-get update | |
apt-get install -y clang | |
- 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: benchmarks | |
overwrite: true | |
update-pr: | |
if: always() | |
needs: | |
- test-incremental-mutants | |
- bench | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: build/ | |
merge-multiple: true | |
- name: list artifacts | |
run: ls -R | |
- name: prep benchmark comment | |
run: | | |
echo "## Benchmark Results" > results.txt | |
echo '```sh' >> results.txt | |
cat build/bench.txt >> results.txt | |
echo '```' >> results.txt | |
echo "## Possible Bugs" >> results.txt | |
echo '```' >> results.txt | |
cat build/missed.txt >> results.txt | |
echo '```' >> results.txt | |
- name: save results locally | |
if: github.actor == 'nektos/act' | |
uses: actions/upload-artifact@v4 | |
with: | |
path: results.txt | |
name: results | |
- name: update pr comment | |
if: github.actor != 'nektos/act' | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: results.txt | |
comment_tag: execution |