Skip to content

diachenko-mischa is testing out GitHub Actions πŸš€ #14

diachenko-mischa is testing out GitHub Actions πŸš€

diachenko-mischa is testing out GitHub Actions πŸš€ #14

name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on: [push]
jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip' # caching pip dependencies
- run: |
pip install gcovr
clang-format -n -Werror `find src -name '*.cpp'`
mkdir build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
clang-tidy -p=build `find src -name '*.cpp'` `find src -name '*.h'`
cmake --build build
./build/src/main --gtest_output=xml:gtest_report.xml
mkdir coverage
python3 -m gcovr --cobertura cobertura-coverage-details.xml
python3 -m gcovr --html-details coverage/coverage-details.html
- uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: gtest_report
path: gtest_report.xml
- uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: coverage
path: coverage/
- uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: cobertura-coverage-details
path: cobertura-coverage-details.xml