Skip to content
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
- run: clang-format -n -Werror `find src -name '*.cpp'`
- run: mkdir build
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- run: clang-tidy -p=build `find src -name '*.cpp'` `find src -name '*.h'`
- run: cmake --build build
- run: ./build/src/main --gtest_output=xml:gtest_report.xml
- run: mkdir coverage
- run: python3 -m gcovr --html-details coverage/coverage-details.html
- run: python3 -m gcovr --cobertura cobertura-coverage-details.xml

Check failure on line 22 in .github/workflows/github-actions-demo.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/github-actions-demo.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
- 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