-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ env: | |
RUN_TESTS: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}} | ||
DEBUG: cypress:cli | ||
RUST_MIN_STACK: 10485760 | ||
CODECOV_FILE: "lcov.info" | ||
|
||
jobs: | ||
formatter: | ||
|
@@ -170,13 +171,6 @@ jobs: | |
tool: sccache | ||
checksum: true | ||
|
||
- name: Install cargo-nextest | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: cargo-nextest | ||
checksum: true | ||
|
||
- name: Install Diesel CLI | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: baptiste0928/[email protected] | ||
|
@@ -342,7 +336,7 @@ jobs: | |
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable 2 weeks ago | ||
components: clippy | ||
components: clippy llvm-tools-preview | ||
|
||
- name: Install sccache | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
|
@@ -351,13 +345,6 @@ jobs: | |
tool: sccache | ||
checksum: true | ||
|
||
- name: Install cargo-nextest | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: cargo-nextest | ||
checksum: true | ||
|
||
- name: Install Diesel CLI | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: baptiste0928/[email protected] | ||
|
@@ -366,21 +353,19 @@ jobs: | |
features: postgres | ||
args: --no-default-features | ||
|
||
- name: Install grcov | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: grcov | ||
|
||
- name: Install Just | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: just | ||
checksum: true | ||
|
||
- name: Install LLVM-profdata | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
run: rustup component add llvm-tools-preview | ||
|
||
- name: Install grcov | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
run: cargo install grcov | ||
|
||
- name: Install Node.js | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: actions/setup-node@v4 | ||
|
@@ -413,13 +398,12 @@ jobs: | |
|
||
- name: Delete compile-time profraw files | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
continue-on-error: true | ||
run: rm *.profraw | ||
run: rm -f *.profraw | ||
|
||
- name: Setup Local Server | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
env: | ||
LLVM_PROFILE_FILE: "vyapti.profraw" | ||
LLVM_PROFILE_FILE: "coverage.profraw" | ||
run: | | ||
# Start the server in the background | ||
target/debug/router & | ||
|
@@ -459,11 +443,11 @@ jobs: | |
|
||
- name: Process coverage report | ||
if: env.RUN_TESTS == 'true' && success() | ||
run: grcov . -s . -t lcov --output-path "lcov.info" --branch --binary-path ./target/debug | ||
run: grcov . -s . -t lcov --output-path ${{ env.CODECOV_FILE }} --branch --binary-path ./target/debug | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v5 | ||
if: env.RUN_TESTS == 'true' && success() | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: "lcov.info" | ||
files: ${{ env.CODECOV_FILE }} |