Browse Source

chore: testing pipeline should only build the tests target and fix workflow_run for build

Almamu 9 months ago
parent
commit
4fcf33e842
2 changed files with 3 additions and 3 deletions
  1. 1 1
      .github/workflows/cmake.yml
  2. 2 2
      .github/workflows/tests.yml

+ 1 - 1
.github/workflows/cmake.yml

@@ -2,7 +2,7 @@ name: CMake
 
 on:
   workflow_run:
-    workflows: [tests]
+    workflows: ['Unit tests']
     branches: [main]
     types: [completed]
   workflow_dispatch:

+ 2 - 2
.github/workflows/tests.yml

@@ -53,11 +53,11 @@ jobs:
     - name: Configure CMake
       # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
       # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
-      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTING=1
+      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTING=1 --target tests
 
     - name: Build
       # Build your program with the given configuration
-      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target tests
 
     - name: Run tests
       # Run the unit tests available