clean code edits #49
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: Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
BUILD_DIR: vol-3-sort-and-search/build | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: build | |
working-directory: ${{env.BUILD_DIR}} | |
run: | | |
cmake .. | |
make | |
- name: test | |
working-directory: ${{env.BUILD_DIR}} | |
run: | | |
EXECUTABLES=$(find . -maxdepth 1 -type f -executable -execdir basename {} \;) | |
for exe in $EXECUTABLES; do | |
echo "Running test: $exe" | |
./path/to/directory/$exe || { echo "$exe failed"; exit 1; } | |
done | |
- name: coverage | |
working-directory: ${{env.BUILD_DIR}} | |
run: | | |
pip install gcovr | |
gcovr -r ../ . |