fix: new tab autofocus #25
This file contains hidden or 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: CI & Tests | |
| on: | |
| push: | |
| branches: ['main', 'master'] | |
| pull_request: | |
| branches: ['main', 'master'] | |
| jobs: | |
| test-and-coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| variant: sccache | |
| key: ${{ github.job }}-${{ runner.os }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xorg-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev gcovr | |
| - name: Configure CMake | |
| run: cmake -B build -DBUILD_TESTING=ON -DENABLE_COVERAGE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache | |
| - name: Build tests | |
| run: cmake --build build --target fast_notepad_tests --parallel | |
| - name: Run tests | |
| run: cd build && ctest --output-on-failure | |
| - name: Generate Code Coverage Report | |
| run: | | |
| mkdir -p coverage | |
| gcovr -r . --object-directory build \ | |
| --filter "src/.*" \ | |
| --xml coverage/coverage.xml \ | |
| --html-details coverage/index.html \ | |
| --print-summary | |
| - name: Upload Coverage Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: code-coverage | |
| path: coverage/ |