Skip to content

Commit 053fe51

Browse files
committed
ci: generate shell completion during regular CI tests
To flag issues with CLI options.
1 parent 6f11552 commit 053fe51

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,19 @@ jobs:
9999

100100
- name: Build and run tests
101101
run: |
102-
# set up environment for coverage support
103-
if [[ ${{ matrix.rust-version }} == 'stable' && ${{ runner.os }} == 'Linux' ]]; then
104-
source <(cargo llvm-cov show-env --export-prefix)
105-
fi
106-
107-
cargo nextest run --features test --workspace --tests
108-
109-
# generate coverage report
102+
# only collect code coverage for the latest rust release on linux
110103
if [[ ${{ matrix.rust-version }} == 'stable' && ${{ runner.os }} == 'Linux' ]]; then
104+
# run tests while collecting coverage data
105+
cargo llvm-cov --no-report nextest --features test --workspace --tests
106+
# generate shell completion files
107+
cargo llvm-cov --no-report run --features shell --bin bite-shell-comp -p bugbite-cli
108+
# generate coverage reports
111109
cargo llvm-cov report --lcov --output-path lcov.info
110+
else
111+
# run tests
112+
cargo nextest run --features test --workspace --tests
113+
# generate shell completion files
114+
cargo run --features shell --bin bite-shell-comp -p bugbite-cli
112115
fi
113116
114117
- name: Upload build artifacts

0 commit comments

Comments
 (0)